09.07.2013, 20:08
Hi,
I have made a vehicle system with mysql but when i save a vehicle i get error:
How i can fix this?
Thanks Admigo
I have made a vehicle system with mysql but when i save a vehicle i get error:
Code:
[22:08:49] 1054, Unknown column 'ACNR' in 'field list', OnQueryFinish, UPDATE `a_vehicles` SET `Created` = 2, `Model` = 602, `XPos` = -1649.86, `YPos` = 1218.89, `ZPos` = 7.01,`APos` = 224.33, `Color1` = 1, `Color2` = 1, `Interior` = 0, `VirtualWorld` = 0,`NumberPlate` = ACNR, `Value` = -615000, `Lock` = 0, `Alarm` = 0, `Paintjob` = 255,`Fuel` = 100.000000 WHERE `Owner` = 'Admigo', 1
pawn Code:
SaveVehicle(playerid,vehicleid)
{
new query1[1000];
format(query1, sizeof(query1), "UPDATE `"#MYSQL_ACCOUNT_TABLE5"` SET `Created` = %d, `Model` = %d, `XPos` = %.2f, `YPos` = %.2f, `ZPos` = %.2f,`APos` = %.2f, `Color1` = %d, \
`Color2` = %d, `Interior` = %d, `VirtualWorld` = %d,`NumberPlate` = %s, `Value` = %d, `Lock` = %d, `Alarm` = %d, `Paintjob` = %d,`Fuel` = %f WHERE `Owner` = '%s'",
VehicleCreated[vehicleid],
VehicleModel[vehicleid],
VehiclePos[vehicleid][0],
VehiclePos[vehicleid][1],
VehiclePos[vehicleid][2],
VehiclePos[vehicleid][3],
VehicleColor[vehicleid][0],
VehicleColor[vehicleid][1],
VehicleInterior[vehicleid],
VehicleWorld[vehicleid],
VehicleNumberPlate[vehicleid],
VehicleValue[vehicleid],
VehicleLock[vehicleid],
VehicleAlarm[vehicleid],
VehiclePaintjob[vehicleid],
Fuel[vehicleid],
GetPlayeridName(playerid));
if(mysql_ping(gSQL))
{
mysql_query(query1, _THREAD_SAVE_VEHICLE, playerid, gSQL);//query
}
}
Thanks Admigo