28.12.2011, 10:23
Код:
errorid: 1064 | error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET `Kills` = '0' SET `Deaths` = '0' SET `Rank` = '75' WHERE `Name` = ''' at line 1 | resultid: -1 | extraid: -1 | callback: NULL | query: UPDATE `players` SET `Money` = '0' SET `Kills` = '0' SET `Deaths` = '0' SET `Rank` = '75' WHERE `Name` = ''
pawn Код:
//OnPlayerConnect
new
Query[90];
mysql_format(connection,Query,"SELECT `Name` FROM `players` WHERE `Name` = '%e'",GetPlayerNameEx(playerid));
mysql_query(Query, USER_CHECK, playerid);
//----------------------------------------------------------------------------------//
stock SavePlayerVariables(playerid)
{
new Query[200];
format(Query,sizeof(Query),"UPDATE `players` SET `Money` = '%i' SET `Kills` = '%i' SET `Deaths` = '%i' SET `Rank` = '%i' WHERE `Name` = '%s'",GetPlayerMoney(playerid),pInfo[playerid][pKills],pInfo[playerid][pRank],GetPlayerEscapeName(playerid));
mysql_query(Query);
}
stock LoadPlayerVariables(playerid)
{
new
query[200];
mysql_format(connection,query,"SELECT * FROM `players` WHERE `Name` = '%s'", GetPlayerNameEx(playerid));
mysql_query(query, LOAD_ACCOUNT_DATA, playerid);
}