I'm having a problem getting the counter value back

Guys, I have a problem. I want to retrieve the value when pressing button 2, and work from that value when pressing button 1, but this does not work


Friend, for you to have more help, faster, you must describe in detail:
What does this routine do?
What is the behavior of this routine?
Is there an error message? …

:point_down:

:+1: