26.01.2015, 23:13
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new query[340], Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Admin`=%d, `VIP`=%d, `Money`=%d, `posX`=%f, `posY`=%f, `posZ`=%f,\
`Score` =%d, `Banned` =%d, `Cuffed` =%d, `Muted` =%d, `Jailed` =%d, `JailTime` =%d, `Drugs` =%d, `DrugAmount` =%d, `Robskill` =%d, `Hitmanskill` =%d, `Terskill` =%d, `TotalRobs` =%d,\
`Skin` =%d, `Team` =%d, `Kills` =%d, `Deaths`=%d WHERE `ID`=%d",
pinfo[playerid][Admin], pinfo[playerid][VIP],pinfo[playerid][Money], pos[0], pos[1], pos[2],
pinfo[playerid][Score],pinfo[playerid][Banned], pinfo[playerid][Cuffed],pinfo[playerid][Muted],
pinfo[playerid][Jailed],pinfo[playerid][JailTime],pinfo[playerid][Drug],pinfo[playerid][DrugAmount],
pinfo[playerid][Robskill],pinfo[playerid][Hitmanskill],pinfo[playerid][Terskill],pinfo[playerid][Skin],
pinfo[playerid][Team],pinfo[playerid][Kills],pinfo[playerid][Deaths],pinfo[playerid][ID]);
mysql_tquery(mysql, query, "", "");
return 1;
}
debug says that :
Код:
[01:46:45] [DEBUG] mysql_format - connection: 1, len: 340, format: "UPDATE `players` SET `Admin`=%d, `VIP`=%d, `Money`=%d, `posX`=%f, `posY`=%f, `posZ`=%f,`Score` =%d, `Banned` =%d, `Cuffed` =%d, ..." [01:46:45] [ERROR] mysql_format - no value for specifier "%d" available [01:46:45] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `players` SET `Admin`=0, `VIP`=0, `Money`=0, `posX`=-9.56", callback: "(null)", format: "(null)" [01:46:45] [DEBUG] CMySQLQuery::Execute[] - starting query execution [01:46:45] [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 '' at line 1 [01:46:45] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError