When I press Login after a GMX my stats reset. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When I press Login after a GMX my stats reset. (
/showthread.php?tid=583879)
[FIXED]When I press Login after a GMX my stats reset. -
DizZykeee - 31.07.2015
My Issue has been fixed. Topic can be removed
Hi there,
I am creating a server and have a working registration/saving system which works when I Disconnect and Reconnect as long as the server is up. When I GMX and connect to the server, my stats are still saved. But at the moment I press LOGIN and spawn, all my stats get reset to 0.
I had it working but suddenly it just wont after a GMX load. I have all of ******'s searches about these problems but still have not found any fix.
I hope I can reach anybody who knows this issue and can help me with it.
I currently use Y_INI + sscanf 2.0 for my stats system.
Let me know!
Re: When I press Login after a GMX my stats reset. -
nezo2001 - 31.07.2015
These may happen because you save the player's stats under OnPlayerDissconnect so when the OnGameModExit run nothing save because you didn't save player's stats and I think you can't save under OnGameModExit because there isn't "playerid" params
Re: When I press Login after a GMX my stats reset. -
DizZykeee - 31.07.2015
Quote:
Originally Posted by nezo2001
These may happen because you save the player's stats under OnPlayerDissconnect so when the OnGameModExit run nothing save because you didn't save player's stats and I think you can't save under OnGameModExit because there isn't "playerid" params
|
Heya thanks for the reply
The server does save the stats OnGameModeExit, I made a complete /gmx command to make sure it will save. It also has a timer so it has the time to save all the player stats. And it does save. At the moment I turn off the server, all the stats get saved perfect. If I start up the server again and join it, it still has all my info saved, but at the moment I press the Login button (after typing my password) it sets everything to 0 somehow.
Re: When I press Login after a GMX my stats reset. -
nezo2001 - 31.07.2015
How did you know that your stats loaded perfectly before you press login\spawn
Re: When I press Login after a GMX my stats reset. -
DizZykeee - 31.07.2015
Quote:
Originally Posted by nezo2001
How did you know that your stats loaded perfectly before you press login\spawn
|
I ALT+TAB at the step that I have to enter my password, I check my scriptfiles for my account and then its still all there. But when I press LOGIN it will spawn me and it will set all stats to 0.
BUT I had a backup file and managed to fix it! The only thing I changed was INI_SetTag(File,"BankData"); which I removed from the files/script and that helped. I still dont know why it resetted all my stats but im happy it works and thanks again for your reply