Saving and Loading best scores

I want to save and load best scores. However, when the game first installed how can I check the “score” file exists? It should have a default value 0.

sys.load() returns an empty table if you try to load a non-existent file, so if your savegame table doesn’t contain the fields you expect it to, that means there was no save file to load from

5 Likes

Check out the defsave extension!

4 Likes