Error Code
#1

pawn Код:
(2627) : error 029: invalid expression, assumed zero
(2627) : error 001: expected token: ";", but found "return"
(2627) : error 017: undefined symbol "i"
(2627) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Line 2627:
pawn Код:
for(new i = 0; i < 4; i++) format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
pawn Код:
forward public LoadVehicleData(vehicleID, name[], value[]);
public LoadVehicleData(vehicleID, name[], value[]) // This a callback with the parameter of the vehicleID send from our VehicleLoad function. This function will pretty much parse the data from the file.
{
    new strLoc[8]; // Will hold the location key name dynamically.
    // The first argument is the key and the second argument is the data which will hold the value of that key.
    INI_Int("model", VehicleInfo[vehicleID][vModel]);
    for(new i = 0; i < 4; i++) format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
    // Looping through our location data and retrive it. Loc0 = LocX, Loc1 = LocY, Loc2 = LocZ, Loc3 = LocA.
    INI_Int("color1", VehicleInfo[vehicleID][vColor1]); // You should've guessed it by now.
    INI_Int("color2", VehicleInfo[vehicleID][vColor2]);
    INI_Int("respawn", VehicleInfo[vehicleID][vRespawn]);
    INI_String("owner", VehicleInfo[vehicleID][vOwner], MAX_PLAYER_NAME);
    VehicleInfo[vehicleID][vLocked] = INI_Int("locked") == 1 ? true : false;
    //Converting the locked data from int(whole number) to bool(true/false) and assign it.

    return 1;
}
Reply
#2

pawn Код:
for(new i = 0; i < 4; i++) { format(strLoc, sizeof(strLoc), "Loc%d", i) INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]); }
Reply
#3

try this one
pawn Код:
for(new i = 0; i < 4; i++)  format(strLoc, sizeof(strLoc), "Loc%d", i); INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)