Very weird bug... Stats mix with each other accounts? -
alanhutch - 07.10.2014
Hi all...
In my GM there's a really weird bug, sometimes, the stats of some accounts mix with each other, here's and example.
Account 1: Password: 1234 Level:1 AdminLevel:0
Account 2: Password: 4321 Level:2 AdminLevel:2000
When someone log-out the stats mix with each other stats, like:
Account 1: Password 4321 Level:2 AdminLevel:2000
Account 2: Password 1234 Level:1 AdminLevel:0
Here's the codes of the OnPlayerLogin...
The weird thing is that in the .db file, the stats are right, but in-game no.
http://pastebin.com/st1Ajc8j
Thank you...
If you want, I can rep++!
Re: Very weird bug... Stats mix with each other accounts? -
Gogeta - 07.10.2014
Happens in my server to when 2 users disconnect same time.
Re: Very weird bug... Stats mix with each other accounts? -
Abagail - 07.10.2014
When does this occur? Have you tried debugging anything? What does the GM look for when they load users? A name? an ID...?
Re: Very weird bug... Stats mix with each other accounts? -
alanhutch - 07.10.2014
Here the GM load the user... In the query.
pawn Код:
stock OnPlayerLogin(playerid, password[])
{
new
data[256],
string[128],
playername[MAX_PLAYER_NAME],
DBResult:result;
GetPlayerName(playerid, playername, sizeof(playername));
Encrypt(password);
format(string, sizeof(string), "SELECT * FROM `Accounts` WHERE `Username` = '%s' AND `Password` = '%s'", playername, password);
result = db_query(AccountDB, string);
//blablabla
So?..
I have tried something, but no results...
Re: Very weird bug... Stats mix with each other accounts? -
Dignity - 07.10.2014
Do you reset a player's variables when they log out?
Re: Very weird bug... Stats mix with each other accounts? -
alanhutch - 07.10.2014
Quote:
Originally Posted by Mionee
Do you reset a player's variables when they log out?
|
I reset the player's variables when they connects.