08.10.2018, 13:48
What's wrong with this query?
I'm struggling from like 2 hours, i'm using R41-4 and i get this errors.
pawn Код:
function Query_LoadVehicles()
{
new endCount = 0, str[128], vehicleid = INVALID_VEHICLE_ID;
for(new i, j = cache_num_rows(); i != j; i++)
{
vehicleid = CreateVehicle(cache_get_value_int(i, "VehicleModel", g_SQL),
cache_get_field_content_float(i, "VehicleParkPosX", g_SQL),
cache_get_field_content_float(i, "VehicleParkPosY", g_SQL),
cache_get_field_content_float(i, "VehicleParkPosZ", g_SQL),
cache_get_field_content_float(i, "VehicleParkPosA", g_SQL),
cache_get_field_content_int(i, "VehicleColor1", g_SQL),
cache_get_field_content_int(i, "VehicleColor2", g_SQL),
-1,
cache_get_field_content_int(i, "VehicleSirens", g_SQL));
if(vehicleid != INVALID_VEHICLE_ID)
{
VehicleInfo[vehicleid][eVehicleExists] = true;
cache_get_value_int(i,"VehicleDBID",VehicleInfo[vehicleid][eVehicleDBID];
cache_get_value_int(i,"VehicleOwnerDBID",VehicleInfo[vehicleid][eVehicleOwnerDBID];
cache_get_value_int(i,"VehicleFaction",VehicleInfo[vehicleid][eVehicleFaction];
cache_get_value_int(i,"VehicleModel",VehicleInfo[vehicleid][eVehicleModel];
cache_get_value_int(i,"VehicleColor1",VehicleInfo[vehicleid][eVehicleColor1];
cache_get_value_int(i,"VehicleColor2",VehicleInfo[vehicleid][eVehicleColor2];
cache_get_value_int(i,"VehicleParkPosX",VehicleInfo[vehicleid][eVehicleParkPos][0];
cache_get_value_int(i,"VehicleParkPosY",VehicleInfo[vehicleid][eVehicleParkPos][2];
cache_get_value_int(i,"VehicleParkPosZ",VehicleInfo[vehicleid][eVehicleParkPos][2];
cache_get_value_int(i,"VehicleParkPosA",VehicleInfo[vehicleid][eVehicleParkPos][3];
cache_get_value_int(i,"VehicleParkInterior",VehicleInfo[vehicleid][eVehicleParkInterior];
cache_get_value_int(i,"VehicleParkWorld",VehicleInfo[vehicleid][eVehicleParkWorld];
cache_get_value_int(i,"VehiclePlates",VehicleInfo[vehicleid][eVehiclePlates];
cache_get_value_int(i,"VehicleLocked",VehicleInfo[vehicleid][eVehicleLocked];
cache_get_value_int(i,"VehicleImpounded",VehicleInfo[vehicleid][eVehicleImpounded];
cache_get_value_int(i,"VehicleImpoundPosX",VehicleInfo[vehicleid][eVehicleImpoundPos][0];
cache_get_value_int(i,"VehicleImpoundPosY",VehicleInfo[vehicleid][eVehicleImpoundPos][1];
cache_get_value_int(i,"VehicleImpoundPosZ",VehicleInfo[vehicleid][eVehicleImpoundPos][2];
cache_get_value_int(i,"VehicleImpoundPosA",VehicleInfo[vehicleid][eVehicleImpoundPos][3];
cache_get_value_int(i,"VehicleFuel",VehicleInfo[vehicleid][eVehicleFuel];
cache_get_value_int(i,"VehicleSirens",VehicleInfo[vehicleid][eVehicleSirens];
cache_get_value_int(i,"VehicleXMR",VehicleInfo[vehicleid][eVehicleHasXMR];
cache_get_value_int(i,"VehicleTimesDestroyed",VehicleInfo[vehicleid][eVehicleTimesDestroyed];
cache_get_value_int(i,"VehicleEngine",VehicleInfo[vehicleid][eVehicleEngine];
cache_get_value_int(i,"VehicleBattery",VehicleInfo[vehicleid][eVehicleBattery];
cache_get_value_int(i,"VehicleHealth",VehicleInfo[vehicleid][eVehicleHealth];
cache_get_value_int(i,"VehicleAlarmLevel",VehicleInfo[vehicleid][eVehicleAlarmLevel];
cache_get_value_int(i,"VehicleLockLevel",VehicleInfo[vehicleid][eVehicleLockLevel];
cache_get_value_int(i,"VehicleImmobLevel",VehicleInfo[vehicleid][eVehicleImmobLevel];
cache_get_value_int(i,"Insurance",VehicleInfo[vehicleid][eVehicleInsurance];
for(new d = 1; d < 5; d++)
{
format(str, sizeof(str), "VehicleLastDrivers%d", d);
VehicleInfo[vehicleid][eVehicleLastDrivers][d] = cache_get_field_content_int(i, str, g_SQL);
format(str, sizeof(str), "VehicleLastPassengers%d", d);
VehicleInfo[vehicleid][eVehicleLastPassengers][d] = cache_get_field_content_int(i, str, g_SQL);
}
if(VehicleInfo[vehicleid][eVehicleParkInterior] != 0)
{
LinkVehicleToInterior(vehicleid, VehicleInfo[vehicleid][eVehicleParkInterior]);
SetVehicleVirtualWorld(vehicleid, VehicleInfo[vehicleid][eVehicleParkWorld]);
}
if(!isnull(VehicleInfo[vehicleid][eVehiclePlates]))
{
SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][eVehiclePlates]);
SetVehicleToRespawn(vehicleid);
}
if(VehicleInfo[vehicleid][eVehicleImpounded] == true)
{
SetVehiclePos(vehicleid, VehicleInfo[vehicleid][eVehicleImpoundPos][0], VehicleInfo[vehicleid][eVehicleImpoundPos][1], VehicleInfo[vehicleid][eVehicleImpoundPos][2]);
SetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][eVehicleImpoundPos][3]);
}
VehicleInfo[vehicleid][eVehicleAdminSpawn] = false;
endCount++;
}
}
printf("[SERVER]: %d vehicles were loaded from database.", endCount);
return 1;
}
Quote:
Hidden(8405) : warning 213: tag mismatch: expected tag none ("_"), but found "MySQL" Hidden(8405 -- 8406) : error 017: undefined symbol "cache_get_field_content_float" Hidden(8415) : warning 217: loose indentation Hidden(8419) : error 017: undefined symbol "cache_get_value_int" Hidden(8419) : warning 202: number of arguments does not match definition Hidden(8419) : error 001: expected token: ",", but found ";" Hidden(8420) : error 017: undefined symbol "cache_get_value_int" Hidden(8420) : warning 202: number of arguments does not match definition Hidden(8420) : error 001: expected token: ",", but found ";" Hidden(8421) : error 017: undefined symbol "cache_get_value_int" Hidden(8421) : warning 202: number of arguments does not match definition Hidden(8421) : error 001: expected token: ",", but found ";" Hidden(8422) : error 017: undefined symbol "cache_get_value_int" Hidden(8422) : warning 202: number of arguments does not match definition Hidden(8422) : error 001: expected token: ",", but found ";" Hidden(8423) : error 017: undefined symbol "cache_get_value_int" Hidden(8423) : warning 202: number of arguments does not match definition Hidden(8423) : error 001: expected token: ",", but found ";" Hidden(8424) : error 017: undefined symbol "cache_get_value_int" Hidden(8424) : warning 202: number of arguments does not match definition Hidden(8424) : error 001: expected token: ",", but found ";" Hidden(8425) : error 017: undefined symbol "cache_get_value_int" Hidden(8425) : warning 202: number of arguments does not match definition Hidden(8425) : error 001: expected token: ",", but found ";" Hidden(8426) : error 017: undefined symbol "cache_get_value_int" Hidden(8426) : warning 202: number of arguments does not match definition Hidden(8426) : error 001: expected token: ",", but found ";" Hidden(8427) : error 017: undefined symbol "cache_get_value_int" Hidden(8427) : warning 202: number of arguments does not match definition Hidden(8427) : error 001: expected token: ",", but found ";" Hidden(842 : error 017: undefined symbol "cache_get_value_int" Hidden(842 : warning 202: number of arguments does not match definition Hidden(842 : error 001: expected token: ",", but found ";" Hidden(8429) : error 017: undefined symbol "cache_get_value_int" Hidden(8429) : warning 202: number of arguments does not match definition Hidden(8429) : error 001: expected token: ",", but found ";" Hidden(8430) : error 017: undefined symbol "cache_get_value_int" Hidden(8430) : warning 202: number of arguments does not match definition Hidden(8430) : error 001: expected token: ",", but found ";" Hidden(8432) : error 017: undefined symbol "cache_get_value_int" |