Posts: 230
Threads: 67
Joined: Jun 2012
Reputation:
0
Sometimes if a player logs in, and freezes on the login screen and has to ctrl+alt+del and quit before they fully login, their account will be fully reset. I fetch the players login details where their name = the name in my database but unsure why it's doing this
Posts: 983
Threads: 98
Joined: Feb 2012
Reputation:
0
Maybe if you provide the specific lines of the query we might be able to help you better!
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
You may have something that deletes players account's if they haven't logged in(this may be meant for registration backouts or something?)
Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
Its most likely because the player exits the game before the account is saved.
Try saving the account under certain functions.
Posts: 109
Threads: 19
Joined: Feb 2015
Reputation:
0
It's most likely because you haven't checked whether the player has actually authenticated and spawned before saving their stats, which causes the data saved under their name to be wiped, as no variables have been set.
Example:
(under your login dialog)
PlayerData[playerid][pLoaded] = true;
(under your data save callback)
if(!PlayerData[playerid][pLoaded])
return 0;
Reset the pLoaded variable once they connect / disconnect.