Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
	
		Well, i don't know whats wrong.
Example:
we 2 players are playing in server.
If player 1 quits his/her game then database saved player 1 stats and it does apply for player 2 also even tho player 2 didn't quit yet. 
it's like if any player quit his/her game then it changes all player stats in database as quitter stats.
What kind of problem it is? Do you think it's because i am saving stats as ID? like WHERE ID=%s? Should i saved player stats as NAME? or what.
please reply fast.
Thank you
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 348
	Threads: 26
	Joined: Oct 2012
	
Reputation: 
0
	 
	
	
		Give us your Save account data codes here
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 128
	Threads: 6
	Joined: Mar 2015
	
Reputation: 
0
	 
	
	
		ID is a number not a string. Replace %s with %i.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
		
		
		
		09.07.2015, 22:26 
(
 Последний раз редактировалось STONEGOLD; 10.07.2015 в 23:54.
)
	
	 
	
		==================== fixed
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
		
		
		
		09.07.2015, 23:10 
(
 Последний раз редактировалось STONEGOLD; 10.07.2015 в 23:54.
)
	
	 
	
		==================== fixed
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
		
		
		
		10.07.2015, 09:31 
(
 Последний раз редактировалось STONEGOLD; 10.07.2015 в 23:54.
)
	
	 
	
		==================== fixed
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
	
		Anyone please help me. It has been 18 hours. IS SAMP DIED?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 455
	Threads: 29
	Joined: Apr 2014
	
	
 
	
	
		Pls stop using so long arrays for so small querys.
And ID must be auto increcement
PHP код:
public SavePlayerData(playerid) 
{ 
    if(IsLoggedIn[playerid] && IsPlayerConnected(playerid) && !IsPlayerNPC(playerid)) 
    { 
        new query[200];
        mysql_format(mysql,query,sizeof(query),"UPDATE users SET Admin='%d',Donator='%d',RegularPlayer='%d',Money='%d',BankMoney='%d',\
        Score='%d',Deaths='%d',Kills='%d' WHERE ID ='%d'",pData[playerid][pAdmin],pData[playerid][pDonator],pData[playerid][pRegularPlayer],
        GetPlayerCash(playerid),pData[playerid][pBankMoney],GetPlayerScore(playerid),pData[playerid][pDeaths],pData[playerid][pKills],pData[playerid][pID]);
        mysql_tquery(mysql, query); 
    } 
    return 1; 
} 
 
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
		
		
		
		10.07.2015, 10:54 
(
 Последний раз редактировалось STONEGOLD; 10.07.2015 в 23:54.
)
	
	 
	
		==================== fixed
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
	
		Really so bad. nobody wants to help me. I m stuck at this and I SAID ITS URGENT! Thanks you all.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 455
	Threads: 29
	Joined: Apr 2014
	
	
 
	
	
		You have to change this Admin`=%d to Admin='%d'
for every single one
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 785
	Threads: 22
	Joined: Jun 2007
	
Reputation: 
0
	 
	
	
		You forgot to strcat the last part of your query..
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 455
	Threads: 29
	Joined: Apr 2014
	
	
 
	
	
		oh no 
PHP код:
mysql_format(mysql, tmp, sizeof(tmp), "WHERE `Username`= '%s'", Name[playerid] );
strcat(query, tmp);
mysql_tquery(mysql, query); 
 
	
		
	
 
 
	
	
	
		
	Posts: 312
	Threads: 83
	Joined: Feb 2012
	
Reputation: 
0
	 
	
		
		
		
		10.07.2015, 14:24 
(
 Последний раз редактировалось STONEGOLD; 10.07.2015 в 23:54.
)
	
	 
	
		==================== fixed