vehicle system
#1

I am scripting a vehicle system according to this tutorial: https://sampforum.blast.hk/showthread.php?tid=416104
And I get this error over and over, help please.

PHP код:
forward public LoadVehicleData(vehicleIDname[], value[]);
public 
LoadVehicleData(vehicleIDname[], value[])
{
    new 
location[32];
    
INI_Int("Model"VehicleInfo[vehicleID][vModel]);
    for(new 
04i++) format(locationsizeof(location), "Loc%d"i), INI_Float(locationVehicleInfo[vehicleID][vLoc][i]);
    
INI_Int("Color 1"VehicleInfo[vehicleID][vColor1]);
    
INI_Int("Color 2"VehicleInfo[vehicleID][vColor2]);
    
INI_String("Owner"VehicleInfo[vehicleID][vOwner], MAX_PLAYER_NAME);
    
VehicleInfo[vehicleID][vLocked] = INI_Int("Locked") == true false;
    return 
1;
}
stock VehicleSave(vehicleID)
{
    new 
INI:dFile INI_Open(VehiclePath(vehicleID))
    new 
location[32];
    
INI_WriteInt(dFile"Model"VehicleInfo[vehicleID][vModel]);
    for(new 
04i++) format(loactionsizeof location"Location: %i"i), INI_Float(locationVehicleInfo[vehicleID][vLoc][i]);
    
INI_WriteInt(dFile"Color 1"VehicleInfo[vehicleID][vColor1]);
    
INI_WriteInt(dFile"Color 2"VehicleInfo[vehicleID][vColor2]);
    
INI_WriteInt(dFile"Owner"VehicleInfo[vehicleID][vOwner]);
    
INI_WriteInt(dFile"Locked"VehicleInfo[vehicleID][vLocked] ? 0);
    
INI_Close(dFile);
    return 
1;

Quote:

The error line of both stocks:
PHP код:
for(new 04i++) format(loactionsizeof location"Location: %i"i), INI_Float(locationVehicleInfo[vehicleID][vLoc][i]); 
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found error 017: undefined symbol "i"
fatal error 107: too many error messages on one line

Reply


Messages In This Thread
vehicle system - by saffierr - 01.01.2016, 02:29
Re: vehicle system - by Kucin666 - 01.01.2016, 02:35
Re: vehicle system - by AndySedeyn - 01.01.2016, 02:36
Re: vehicle system - by saffierr - 01.01.2016, 02:50
Re: vehicle system - by AndySedeyn - 01.01.2016, 02:59
Re: vehicle system - by saffierr - 01.01.2016, 03:58
Re: vehicle system - by AndySedeyn - 01.01.2016, 12:44
Re: vehicle system - by saffierr - 01.01.2016, 14:17

Forum Jump:


Users browsing this thread: 4 Guest(s)