Player position is not being saved.

Posted by amkgames
Hey,

My player's position is not being saved and some other data too in player ini.
I am using this code:
gms_ini_player_write("Player", "X", obj_player.x);
gms_ini_player_write("Player", "Y", obj_player.y);

But some code are being saved.

Thanks! :)

Replies (6)

Last message on 11 Aug 2016

Size43 (Administrator) on 10 Aug 2016, 20:36:18
Could you please check if it's all there now?

The INIs are cached on the server, so it takes some time before they show up on the site.
amkgames (Topicstarter) on 10 Aug 2016, 20:45:23
Btw, position is not being loaded. That means it has not been saved.
Size43 (Administrator) on 10 Aug 2016, 20:48:03
When are you saving the data to the INI? If it's right before ending the game, there might not be enough time to save the data.
amkgames (Topicstarter) on 11 Aug 2016, 07:45:12
Thank you, they are working now. :D
amkgames (Topicstarter) on 10 Aug 2016, 20:50:15
Right before game_end(). Oh, I will try changing code tomorrow. Thanks! :) For now, I am so sleepy. Good Night!
amkgames (Topicstarter) on 10 Aug 2016, 20:40:49
Still same as before. I will check tomorrow if the position is being saved correctly.