To load and save the state of a game, and so the high-score list, just copy some code from the game CometCrusher.
LoadHighScore
method of Chapter 4, Game #3, CometCrusher.Method LoadHighScore:Int () Local state:String = LoadState() If state Then eng.scoreList.LoadFromString(state) Endif Return 0 End
SaveHighScore
method from Chapter 4, Game #3, CometCrusher.Method SaveHighScore:Int () Local hs:String = g.eng.scoreList.SaveToString() SaveState(hs) Return 0 End
By reusing these two methods, you have saved yourself some valuable time for the future development of this game. It seems small, but when you reuse more and more, the advantage becomes visible.