Database bug
#1

When a player is logging with the same ID as the previous player was it's loading the prev player's database instead of the right one
Reply
#2

Can you show us the part of your code which handles loading player data upon log in?
Reply
#3

Quote:
Originally Posted by rappy93
View Post
Can you show us the part of your code which handles loading player data upon log in?
http://pastebin.com/zQxEDiw0
Reply
#4

bump
Reply
#5

You have to reset their stats upon disconnecting to prevent such things.
Reply
#6

Quote:
Originally Posted by rappy93
View Post
Can you show us the part of your code which handles loading player data upon log in?
Quote:
Originally Posted by itsCody
View Post
You have to reset their stats upon disconnecting to prevent such things.
PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    if(
Logged[playerid] == true){SavePlayerFile(playerid);}
    
ResetPlayerVariables(playerid);
    return 
1;

that's what i've currently.
Reply
#7

Show ResetPlayerVariables
Reply
#8

Quote:
Originally Posted by itsCody
View Post
Show ResetPlayerVariables
whatchu mean?
Reply
#9

Sorry for bumping again but I really need an answer asap
Reply
#10

Quote:
Originally Posted by itsCody
View Post
Show ResetPlayerVariables
He means send the function of ResetPlayerVariables
Reply
#11

Quote:
Originally Posted by Godey
View Post
He means send the function of ResetPlayerVariables
OMFG I'm so retarded I forgot to add all of the variables, btw EOS = end of string so what's End of Int? 0?

PHP Code:
stock ResetPlayerVariables(playerid)
{
    
DB[playerid][Password] = EOS;
    
Logged[playerid] = false;
    return 
1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)