Search code examples
androidgame-makergml

GameMaker: saving highscore


I am having trouble getting my app to save high-scores when I am testing it on an android device; It seems to work fine on the windows simulator. I've made a save script and a load script, is there something I am missing?

(Using GML code)

In the save script i have:

ini_open("global.highscore.ini");
ini_write_real("global.score","global.highscore",score);
ini_close();

In End Game event:

ini_open("global.highscore.ini");
global.highscore = ini_read_real("global.score","global.highscore",score);
ini_close()

Solution

  • Instead of just testing the game by connecting your computer to your Android device, export the .APK file to your computer first. Next, take the file, place it in a folder on your Android, and install it manually.