04.04.2013, 00:21
Code:
Error:
pawn Код:
CMD:move(playerid, params[]) {
new szQuery[128], Location[128], Float:Pos1, Float:Pos2, Float:Pos3, Float:Angle;
if(sscanf(params, "s[128]", Location))
return SendClientMessage(playerid, COLOR_GREY, "SERVER: /Move [Location]");
if(strcmp(Location, "Spawn", true) == 0)
{
GetPlayerPos(playerid, Pos1, Pos2, Pos3);
GetPlayerFacingAngle(playerid, Angle);
format(szQuery, sizeof(szQuery), "UPDATE configuration SET SpawnPosX = '%d', SpawnPosY = '%d', SpawnPosZ = '%d', SpawnPosAngle = '%d'", Pos1, Pos2, Pos3, Angle);
mysql_query(szQuery, THREAD_NO_RESULT, playerid, iConnectionHandle);
SendClientMessage(playerid, COLOR_GREY, "Spawn location moved.");
}
else SendClientMessage(playerid, COLOR_GREY, "Invalid location.");
return 1;
}
Код:
Error #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 ''1126695' at line 1 | Query: UPDATE configuration SET SpawnPosX = '1155937807', SpawnPosY = '1156348504', SpawnPosZ = '1093476352', SpawnPosAngle = '1126695