Error Help
#5

Quote:
Originally Posted by Runn3R
Посмотреть сообщение
Код:
stock VehiclePath(vehicleID) // Creating a function which will get the vehicle path dynamically based on the vehicle id of the system. 
{ 
    new strPath[64]; // Declaring the variable which will hold and return the vehicle path by vehicle id. 
    format(strPath, sizeof(strPath), "/vehicle/%d.ini", vehicleID); // We are formatting the string so that it holds the file path based on the vehicle id. '%d' means it will be a whole number. 

    return strPath; // Return the file path so that it can be manipulate later on. 
}
First error: You are missing vehicleID from the format.

Код:
stock VehicleLoad(vehicleID, file[]) 
// This function will load the vehicle provided by the id when the server starts. 
{ 
    INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = vehicleID); // Parse the vehicle data from the INI file. 
    VehicleCreate(VehicleInfo[vehicleID][vModel], 
    VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2], VehicleInfo[vehicleID][vRespawn], 
    VehicleInfo[vehicleID][vOwner], VehicleInfo[vehicleID][vLocked]); // Creates the vehicle from the information we loaded and parsed. Pretty self-explanatory. 
}
Код:
VehicleInfo[vehicleID][vLoc],


Код:
Float:vLoc[4],
Fix that.
Quote:

(76 -- 77) : error 047: array sizes do not match, or destination array is too small
(86) : error 029: invalid expression, assumed zero
(86) : error 001: expected token: ";", but found "return"
(86) : error 017: undefined symbol "i"
(86) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

[/QUOTE]
Line [76--77]
PHP код:
    VehicleCreate(VehicleInfo[vehicleID][vModel],
    
VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2], VehicleInfo[vehicleID][vRespawn], 
Line [86]
PHP код:
for(new 04i++) format(strLocsizeof(strLoc), "Loc%d"i), INI_Float(strLocVehicleInfo[vehicleID][vLoc][i]); 
Reply


Messages In This Thread
Error Help - by ommar8080 - 02.04.2017, 20:41
Re: Error Help - by Marricio - 02.04.2017, 23:32
Re: Error Help - by ommar8080 - 03.04.2017, 07:47
Re: Error Help - by Runn3R - 03.04.2017, 09:11
Re: Error Help - by ommar8080 - 03.04.2017, 09:17
Re: Error Help - by Runn3R - 03.04.2017, 09:52
Re: Error Help - by ommar8080 - 03.04.2017, 10:04
Re: Error Help - by Runn3R - 03.04.2017, 10:38
Re: Error Help - by ommar8080 - 03.04.2017, 11:08
Re: Error Help - by ommar8080 - 03.04.2017, 11:11

Forum Jump:


Users browsing this thread: 1 Guest(s)