How do i end a game and moove back to the first screen

You did not show us your arithmetic procedure.

Your Submit button's if/then test for an answer match is reversed. You give a consolation message if the answer matches your answer variable, and a congratulations with an extra score point if it doesn't match?

You have a typo in your end_game procedure name. Retype the name and the calls to it will be corrected automatically.

Reopening Screen1 is not the way to reset your program variables. Instead, code a procedure (call it, let's say, reset) and call it from Screen1.Initialize and from the places where you wanted to start a new game. In that procedure, set score to 0, and number of games to 0. You probably have some other variables to reset in that procedure.

See the notes on why you should not open Screen1 in the Screens FAQ:

P.S. Give my regards to Nissan and Tammuz.

1 Like