SaveVehicle(vehicleid) {
if(!Iter_Contains(ServerVehicles, vehicleid)) return 0;
format(vInfo[vehicleid][vehName], 16, GetVehicleName(vInfo[vehicleid][vehModel]));
GetVehiclePos(vInfo[vehicleid][vehSessionID], vInfo[vehicleid][vehX], vInfo[vehicleid][vehY], vInfo[vehicleid][vehZ]);
GetVehicleZAngle(vInfo[vehicleid][vehSessionID], vInfo[vehicleid][vehA]);
new query[500];
mysql_format(mysql, query, sizeof(query), "UPDATE `Vehicles` SET `vehName` = '%e', `vehOwner` = '%e', `vehLock` = %i, `vehModel` = %i,\
`vehPlate` = '%e', `vehMod_1` = %i, `vehMod_2` = %i, `vehMod_3` = %i, `vehMod_4` = %i, `vehMod_5` = %i, `vehMod_6` = %i, `vehMod_7` = %i,\
`vehMod_8` = %i, `vehMod_9` = %i, `vehMod_10` = %i, `vehMod_11` = %i, `vehMod_12` = %i, `vehMod_13` = %i, `vehMod_14` = %i, `vehColorOne` = %i,\
`vehColorTwo` = %i, `vehX` = %f, `vehY` = %f, `vehZ` = %f, `vehA` = %f WHERE `vehID` = %d", vInfo[vehicleid][vehName], vInfo[vehicleid][vehOwner],
vInfo[vehicleid][vehLock], vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate], vInfo[vehicleid][vehMod][0], vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2],
vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5], vInfo[vehicleid][vehMod][6], vInfo[vehicleid][vehMod][7], vInfo[vehicleid][vehMod][8],
vInfo[vehicleid][vehMod][9], vInfo[vehicleid][vehMod][10], vInfo[vehicleid][vehMod][11], vInfo[vehicleid][vehMod][12], vInfo[vehicleid][vehMod][13], vInfo[vehicleid][vehColorOne],
vInfo[vehicleid][vehColorTwo], vInfo[vehicleid][vehX], vInfo[vehicleid][vehY], vInfo[vehicleid][vehZ], vInfo[vehicleid][vehA], vInfo[vehicleid][vehID]);
mysql_tquery(mysql, query);
return 1;
}
rp.pwn(1585) : error 075: input line too long (after substitutions) rp.pwn(1586) : error 037: invalid string (possibly non-terminated string) rp.pwn(1586) : error 017: undefined symbol "UPDATE" rp.pwn(1586) : error 029: invalid expression, assumed zero rp.pwn(1586) : fatal error 107: too many error messages on one line

mysql_format(mysql,query,sizeof(query),"UPDATE `Vehicles` SET `vehName`='%e',`vehOwner`='%e',`vehLock`='%d',`vehModel`='%d',`vehPlate`='%e',`vehMod_1`='%d'",
vInfo[vehicleid][vehName], vInfo[vehicleid][vehOwner],vInfo[vehicleid][vehLock], vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate], vInfo[vehicleid][vehMod][0]);
mysql_format(mysql,query,sizeof(query),"%s,`vehMod_2`='%d',`vehMod_3`='%d',`vehMod_4`='%d',`vehMod_5`='%d',`vehMod_6`='%d',`vehMod_7`='%d',`vehMod_8`='%d',`vehMod_9`='%d'",
query,vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2],vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5],
vInfo[vehicleid][vehMod][6], vInfo[vehicleid][vehMod][7], vInfo[vehicleid][vehMod][8]);
mysql_format(mysql,query,sizeof(query),"%s,`vehMod_10`='%d',`vehMod_11`='%d',`vehMod_12`='%d',`vehMod_13`='%d',`vehMod_14`='%d',`vehColorOne`='%d',`vehColorTwo`='%d'",
query,vInfo[vehicleid][vehMod][9], vInfo[vehicleid][vehMod][10], vInfo[vehicleid][vehMod][11], vInfo[vehicleid][vehMod][12], vInfo[vehicleid][vehMod][13], vInfo[vehicleid][vehColorOne],
vInfo[vehicleid][vehColorTwo]);
mysql_format(mysql,query,sizeof(query),"%s,`vehX`='%f',`vehY`='%f',`vehZ`='%f',`vehA`='%f' WHERE `vehID`='%d'",
query,vInfo[vehicleid][vehX], vInfo[vehicleid][vehY], vInfo[vehicleid][vehZ], vInfo[vehicleid][vehA], vInfo[vehicleid][vehID]);
|
Or you can do it properly instead of trying to hack around the problem. See the tutorial about storing vehicle mods in my signature.
|
vehicle_component[14],
format(visual_tuning, sizeof(visual_tuning), "%d %d %d %d %d %d %d %d %d %d %d %d %d %d", comp0, comp1, comp2, comp3, comp4, comp5, comp6, comp7,comp8, comp9, comp10, comp11, comp12, comp13);
mysql_query(mySQLconnection, sprintf("UPDATE vehicles SET vehicle_component = '%s' WHERE vehicle_uid = %d", visual_tuning, Vehicle[vehid][vehicle_uid]));
new tmp_comp[70]; cache_get_row(row, 24, tmp_comp); sscanf(tmp_comp, "a<d>[12]", Vehicle[vid][vehicle_component]);