#Help with saving and loading a variable

1 messages · Page 1 of 1 (latest)

white shuttle
#

I'm trying to make kind of a tetris clone and in my code, i save the high score when the game stops. I know the save file exists and i can read it but it always outputs 0. I define the variable (top_score) as an int and make its value be equal to score if the score is higher than itself. Here's the code :

willow moth
#

you need to actually assign its result to the variable you would like to have hold the result

#

(so: top_score = file.get_var() -- sorry, I didn't check which variable names you used, it's a lot of code to skim through!)