MySQL wiping account

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

Maybe if you provide the specific lines of the query we might be able to help you better!

You may have something that deletes players account's if they haven't logged in(this may be meant for registration backouts or something?)

Its most likely because the player exits the game before the account is saved.
Try saving the account under certain functions.

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.


(under your login dialog)
PlayerData[playerid][pLoaded] = true;

(under your data save callback)
return 0;

Reset the pLoaded variable once they connect / disconnect.

Forum Jump:

Users browsing this thread: 1 Guest(s)