07.01.2018, 17:04
My query doesn't update and I don't know why...
This is the errors.log of mysql:
and this is the line of the script:
This is the errors.log of mysql:
Код:
[plugins/mysql] error #1064 while executing query "UPDATE `players` SET `ip` = 255.255.255.255, `level` = 1, `cash` = 1500, `skin` = 55, `health` = 100.000000, `armour` = 0.000000, `x` = 1961.375488, `y` = 1345.643921, `z` = 15.374607, `angle` = 294.196442, `interior` = 0, `vw` = 0 WHERE `id` = 1 LIMIT 1": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.255.255, `level` = 1, `cash` = 1500, `skin` = 55, `health` = 100.000000, `armou' at line 1
pawn Код:
new query[500];
mysql_format(Database, query, sizeof query, "UPDATE `players` SET `ip` = %s, `level` = %d, `cash` = %d, `skin` = %d, `health` = %f, `armour` = %f, `x` = %f, `y` = %f, `z` = %f, `angle` = %f, `interior` = %d, `vw` = %d WHERE `id` = %d LIMIT 1", pInfo[playerid][IP], pInfo[playerid][Level], pInfo[playerid][Cash], pInfo[playerid][Skin], pInfo[playerid][Health], pInfo[playerid][Armour], pInfo[playerid][X_Pos], pInfo[playerid][Y_Pos], pInfo[playerid][Z_Pos], pInfo[playerid][A_Pos], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), pInfo[playerid][ID]);
mysql_tquery(Database, query);