01.01.2016, 02:29
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.
And I get this error over and over, help please.
PHP код:
forward public LoadVehicleData(vehicleID, name[], value[]);
public LoadVehicleData(vehicleID, name[], value[])
{
new location[32];
INI_Int("Model", VehicleInfo[vehicleID][vModel]);
for(new i = 0; i < 4; i++) format(location, sizeof(location), "Loc%d", i), INI_Float(location, VehicleInfo[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") == 1 ? 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 i = 0; i < 4; i++) format(loaction, sizeof location, "Location: %i", i), INI_Float(location, VehicleInfo[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] ? 1 : 0);
INI_Close(dFile);
return 1;
}
Quote:
The error line of both stocks: PHP код:
error 001: expected token: ";", but found error 017: undefined symbol "i" fatal error 107: too many error messages on one line |