05.03.2015, 10:13
does anybody know what is the problem ?
it doesn't save stats
and error is this :
my code :
it doesn't save stats
and error is this :
Код:
[14:14:55] [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 '`ID`=2' at line 1 [14:14:55] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
PHP код:
stock SavePlayerStats(playerid)
{
if(pData[playerid][Logged] == false) return 1;
new Qry[700];
mysql_format(mysql, Qry, sizeof(Qry), "UPDATE `accounts` SET `Admin`=%d\
, `Vip`=%d, `Money`=%d\
, `Score` =%d, `GangID` = %d\
, `GangLead` = %d, `InGang` =%d\
, `Jailed` = %d, `Jail_h` = %d\
, `jail_m` = %d, `capsoff` = %d\
, `house_o` = %d, `lockpick` = %d\
, `drugs` =%d, drugseeds=%d,Bank =%d\
, `fight` =%d, `kills` =%d , `deaths` = %d, `highspree` = %d\
, `p_hours` =%d\
WHERE `ID`=%d",
pData[playerid][Admin],
pData[playerid][Vip],
GetCash(playerid),
GetPlayerScore(playerid),
pData[playerid][Gang_ID],
pData[playerid][Gang_LEAD],
pData[playerid][InGang],
pData[playerid][Jailed],
pData[playerid][H_Jailed],
pData[playerid][M_Jailed],
pData[playerid][Capsoff],
pData[playerid][House_o],
pData[playerid][LockPick],
pData[playerid][Drugs],pData[playerid][DrugSeed],pData[playerid][Bank],
pData[playerid][Fight],pData[playerid][Kills],pData[playerid][Deaths],pData[playerid][HIGH_SPREE],
pData[playerid][hours],
pData[playerid][p_ID]);
mysql_tquery(mysql, Qry, "", "");
return 1;
}