Okay, two questions. Anyone is welcome to help.
1: Why doesn’t the number of money show up after the game reloads? It is being saved.
2: Why does my game break when the main variable (delivery_start?) is set to true, and the status bar is filling?
If anyone has an answer to it, you are welcome to weld it into the code. - CyberPulse
I fixed the money thing with 1 easy thing. Basically you set the money on the sprite but not the saved money on the money variable.
I have not checked the second problem but the game didnt break for me in the 3 minutes
For #1, in your
game function, you test for whether the setting has been saved, but you never load it back into the
money variable. Change the
else clause to this:
For #2, I have a feeling I know what is going on, although I couldn’t test it for sure. You have this:
This is an example of an infinite loop. Once you enter the
while loop, you have no way of getting out, and your game will appear to be frozen. What I think you want is something like this:
Your game still might freeze until the status bar fills up, though, because
pause is what’s called a blocking function. A blocking function stops your code until it completes. If that’s the case, then you can do this instead:
Good luck! Let us know if you need additional help.
Thanks for the help man! You too @DahbixLP !