Game won't terminate
Posted: Fri Aug 10, 2012 3:33 pm
It's about time that I ask for help with a bug in T&S that I've always known about but have no leads on. When the game ends, if the player selects "Q" to quit, the game simply goes back into normal execution. You can then re-do the action that trigged the ending, and win (or die) over and over again:
In the code, I trigger the endings with the EndGlag routine, like this:
I assume that the problem has to be with the endflag variable, but I have no way to prove it. I tried watching endflag in the Debugger, but the watch window always shows "endflag = 0" even when the "YOU'VE WON..." message is being displayed and the interpreter is waiting for one of the options to be selected.*** YOU’VE WON THE GAME! ***
The game has ended. Do you want to (R)ESTART, R(E)STORE a saved game, (U)NDO your last turn, or (Q)UIT? q
>q
Are you sure you want to quit (YES or NO)? y
In the code, I trigger the endings with the EndGlag routine, like this:
Code: Select all
Endgame(1)