MySQL wiping account
#1

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
Reply
#2

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

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)