[12:24:32] [ERROR] CMySQLQuery::Execute[CreateNewVeh] - (error #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 ')' at line 1
AddVehicleToDB(playerid, model, color1, color2, Float:x, Float:y, Float:z, Float:a, team, type)
{
new idx = FreevIndex();
if(idx == -1) return 0;
mysql_format(mysql, dquery, sizeof(dquery), "INSERT INTO `vehicles` (model, color1, color2, posx, posy, posz, posa, team, type) VALUES ('%s', %d, %d, %d, %f, %f, %f, %f, %d, %d)", model, color1, color2, x, y, z, a, team, type);
mysql_tquery(mysql, dquery, "CreateNewVeh", "iiiffffiiii", model, color1, color2, x, y, z, a, idx, playerid, team, type);
return 1;
}
PF:CreateNewVeh(model, color1, color2, Float:x, Float:y, Float:z, Float:a, idx, playerid, team, type)
{
Vehicle[idx][ID] = cache_insert_id();
Vehicle[idx][Model] = model;
Vehicle[idx][Color1] = color1;
Vehicle[idx][Color2] = color2;
Vehicle[idx][PosX] = x;
Vehicle[idx][PosY] = y;
Vehicle[idx][PosZ] = z;
Vehicle[idx][PosA] = a;
Vehicle[idx][Type] = type;
Vehicle[idx][Team] = team;
Vehicle[idx][Created] = false;
vCreateIndex(idx);
if(IsPlayerConnected(playerid))
{
SCM(playerid, COL_WHITE, " >> Vehicle successfully created. ");
}
SetVehicleParamsEx(Vehicle[idx][ID],VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
PutPlayerInVehicle(playerid, Vehicle[idx][ID], 0);
return 1;
}
Your specifier list doesn't match up with your value list. You have 10 specifiers but only 9 values.
|