06.02.2016, 14:46
I cannt find the error! Anyone help me?
And here my mysql log
Ty for help!
PHP код:
forward SaveAccountStats(playerid);
public SaveAccountStats(playerid)
{
if(Logged[playerid] == 1)
{
new query[2048];
mysql_format(g_SQL, query, sizeof(query), "UPDATE `accounts` SET `Cash`=%d, `AdminLevel`=%d, `VIPLevel`=%d, `Kills`=%d, `Deaths`=%d, `Score`=%d, `Rank`=%s, `Headshots`=%d, `Banned`=%d, `Warns`=%d,\
`hours`=%d, `minutes`=%d, `Color`=%d, `Turfs`=%d, `VW`=%d, `Interior`=%d, `PM`=%d, `Clan`=%s, `ClRank`=%d, `ClLeader`=%d, `Invited`=%d, `Inviting`=%d WHERE `ID`=%d",\
Player[playerid][pCash],
Player[playerid][pAdminLevel],
Player[playerid][pVIPLevel],
Player[playerid][pKills],
Player[playerid][pDeaths],
Player[playerid][pScore],
Player[playerid][pRank],
Player[playerid][pHeadshots],
Player[playerid][pBanned],
Player[playerid][pWarns],
Player[playerid][phours],
Player[playerid][pminutes],
Player[playerid][pColor],
Player[playerid][pTurfs],
Player[playerid][pVW],
Player[playerid][pInt],
Player[playerid][pPM],
Player[playerid][pClan],
Player[playerid][pClRank],
Player[playerid][pClLeader],
Player[playerid][pInvited],
Player[playerid][pInviting],
Player[playerid][pID]);
mysql_tquery(g_SQL, query, "", "");
return 1;
}
return 0;
}
PHP код:
[15:55:13] [DEBUG] mysql_format - connection: 1, len: 2048, format: "UPDATE `accounts` SET `Cash`=%d, `AdminLevel`=%d, `VIPLevel`=%d, `Kills`=%d, `Deaths`=%d, `Score`=%d, `Rank`=%s, `Headshots`=%d,..."
[15:55:13] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET `Cash`=10000, `AdminLevel`=1339, `VIPLevel", callback: "(null)", format: "(null)"
[15:55:13] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[15:55:13] [ERROR] CMySQLQuery::Execute[] - (error #1064) 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 ' `Headshots`=0, `Banned`=0, `Warns`=0,`hours`=0, `minutes`=11, `Color`=0, `Turfs' at line 1
[15:55:13] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError