13.02.2012, 19:55
hi,
im getting a syntax error on this part of the code, what might cause this error?(at the INSERT INTO part)
im getting a syntax error on this part of the code, what might cause this error?(at the INSERT INTO part)
pawn Код:
new ClothingReAttachementDataID[MAX_PLAYERS][3],
Float:ClothingReAttachementDataFloat[MAX_PLAYERS][6];
new pname[24],query[128],queryc[256];
GetPlayerName(playerid,pname,24);
format(query, sizeof(query), "SELECT name FROM `clothes` WHERE name = '%s' LIMIT 1", pname);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
if(!rows)
{
format(queryc, sizeof(queryc), "INSERT INTO `clothes` (name, index, model, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ) VALUES('%s','%d','%d','%d','%f','%f','%f','%f','%f','%f')",
pname,ClothingReAttachementDataID[playerid][0],ClothingReAttachementDataID[playerid][1],ClothingReAttachementDataID[playerid][2],ClothingReAttachementDataFloat[playerid][0],ClothingReAttachementDataFloat[playerid][1],ClothingReAttachementDataFloat[playerid][2],ClothingReAttachementDataFloat[playerid][3],ClothingReAttachementDataFloat[playerid][4],ClothingReAttachementDataFloat[playerid][5]);
mysql_query(queryc);
}
mysql_free_result();