05.12.2013, 04:55
I haven't really had this much trouble with SQL, and im completely stumped.
Whats up?
pawn Код:
public create_tspawn(playerid,String[])
{
new Float:X, Float:Y, Float:Z, Float:A,Query[280];
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
new Team = pInfo[playerid][pTeam];
new Int = GetPlayerInterior(playerid);
new VW = GetPlayerVirtualWorld(playerid);
new Skin = GetPlayerSkin(playerid);
format(Query, sizeof(Query), "INSERT INTO teamspawn (Name, PosX, PosY, PosZ, PosA, Team, Int, VW, Skin) VALUES('%s', %f, %f, %f, %f,%d,%d,%d,%d)", String, X,Y,Z,A,Team, Int, VW, Skin);
mysql_query(Query);
return 1;
}
Код:
[00:58:27] CMySQLHandler::Query(INSERT INTO teamspawn (Name, PosX, PosY, PosZ, PosA, Team, Int, VW, Skin) VALUES('hi', 1958.378295, 1343.157226, 15.374607, 269.142486,2,0,0,0)) - An error has occured. (Error ID: 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 'Int, VW, Skin) VALUES('hi', 1958.378295, 1343.157226, 15.374607, 269.142486,2,0,' at line 1)