S is your score, right? If S is higher than the previous high score, you should be saving S, not the previous high score: IF S>HIGHSCORE THEN SAVE "TXT:HIGHSCORE",STR$(S)