Okay! I have the code reading the file numbers into the variables now, so that's good! I'm just not finding the right place to PUT that code. I originally was putting in the Game script's "replay" method, but I don't think that's the right place. I'll keep looking.
So this is getting tricky. Basically, I don't think there is any method or procedure that runs exclusively when you restore the game, which is where I would need to put the code to re-orient the variables.
So the work-around would be to set up a variable (gRestoringTheGame) which I set to TRUE when I restore the game. Then in the Main Script's doit method, I check if this variable is true, run the "read the variable from the temp file" code, then set gRestoringTheGame back to FALSE.
Of course, the obvious hurdle I forgot about was that gRestoringTheGame ITSELF would be set back to FALSE upon the restore of the game, and then the doit method wouldn't read it as TRUE and run the code.
So, I have to write gRestoringTheGame into the Temp file also, then in the Main Script's doit method, read the Temp file for gRestoringTheGame to make it TRUE, which will in turn trigger to read the rest of the Temp file for the other variables, then set gRestoringTheGame to false, so it's not repeating this process every cycle of the game...and while I know this sounds superfluous, it's not.
If you start a new game and there is not gRestoringTheGame flag to stop the constant writing of variables from the temp file, the new game's variables will be overwritten before the player even does anything.