06.02.2012, 16:22
Alright, MySQL returns this:
pawn Код:
[18:19:51] mysql 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 'VV19ZASYFV,0,0,0,0,0,0,0,0)' at line 1
//as you can see this is plate... heres the insert:
new query[550];
format(query, sizeof(query), "INSERT INTO `ownedvehicles` (VehModel, VehOwner, VehSpawnX, VehSpawnY, VehSpawnZ,VehSpawnAngle, VehColour1, VehColour2, VehFuel, VehPlate, VehWep1,VehWepA1,VehWep2,VehWepA2,VehWep3,VehWepA3, VehCash, VehArmour) VALUES (%d, '%s', -199.5428,1224.1710,19.5659,180.0,%d,%d,%d,%s,0,0,0,0,0,0,0,0)",model, GetName(playerid),colour1, colour2, random(100), string);
mysql_query(query);
pawn Код:
new string[MAX_VEHICLE_PLATE];
new const charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for(new i; i < MAX_VEHICLE_PLATE; i++)
{
string[i] = charset[RandomEx(0, sizeof(charset) - 1)];
}