I'm making a physical exercise application and with each execution screen I must go through a waiting screen and open the next screen, to stay in order I wrote the following code
each screen opened increases the "global all", the problem is that when the screen referring to all==2 should open, the screen referring to all==1 keeps opening several times, all2 even appears, but all 1 opens in top and then all1 opens on itself and so on...