mysql weapon position save error
#1

i got this error
Код:
[18:42:19] [Admin Ьzenet] [MYSQL ERROR]: ID: 1064

[18:42:19] [Admin Ьzenet] [MYSQL ERROR]: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB se

[18:42:19] [Admin Ьzenet] [MYSQL ERROR]: Query: INSERT INTO weaponsettings (Name, WeaponID, PosX, PosY, PosZ, RotX, RotY, RotZ) VALUES ('H
when i use this code
Код:
            mysql_format(SQL_CONNECTION, string, sizeof(string), "INSERT INTO weaponsettings (Name, WeaponID, PosX, PosY, PosZ, RotX, RotY, RotZ) VALUES ('%s', %d, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f) ON DUPLICATE KEY UPDATE PosX = VALUES(PosX), PosY = VALUES(PosY), PosZ = VALUES(PosZ), RotX = VALUES(RotX), RotY = VALUES(RotY), RotZ = VALUES(RotZ)", name, weaponid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ);
            mysql_tquery(SQL_CONNECTION, string);
Reply
#2

bump
Reply
#3

You forgot the ' ' in the VALUES.
Reply
#4

so you think that?
Код:
mysql_format(SQL_CONNECTION, string, sizeof(string), "INSERT INTO weaponsettings (Name, WeaponID, PosX, PosY, PosZ, RotX, RotY, RotZ) VALUES ('%s', %d, %.3f, %.3f, %.3f, %.3f, %.3f, %.3f) ON DUPLICATE KEY UPDATE PosX = VALUES('PosX'), PosY = VALUES('PosY'), PosZ = VALUES('PosZ'), RotX = VALUES('RotX'), RotY = VALUES('RotY'), RotZ = VALUES('RotZ')", name, weaponid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ);
mysql_tquery(SQL_CONNECTION, string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)