Android on_game_paused and saving on android

V

Verilyzed

Guest
Hello!
My name ist Colin.

I got a problem with saving my game with *.ini files while using step event and on_game_paused.

I also used Game End and Room End events. Also I used event_perform in combination with step and on_game_paused and performed a new user event with that code in it.
This is the only code i got.

Code:
if (os_is_paused()) {
     ini_open("save.ini")
    
     ini_write_real("save", "money", global.money);
     ini_write_real("save", "coins", global.coins);

     ini_write_real("save", "xp", global.xp);
     ini_write_real("save", "lvl", global.level);

     ini_write_real("save", "high", global.high);
     ini_write_real("save", "wanted", global.wanted);
    
     ini_close();
    }
It were really nice if someone could help me out.

Thanks!
 
V

Verilyzed

Guest
It dont save the game if you quit it. I want if i quit the game that it saves but it dont save the game
 

FrostyCat

Redemption Seeker
Trying to catch and react to hard quits on a mobile platform is a fool's errand. The only mitigation is to save early and save often.
 
V

Verilyzed

Guest
Okay thats bad.
But in Game Maker 1 this function worked for me so im a little bit confused.
 
Top