03.10.2011, 17:58
Hey guys,
Im getting a weird error while compiling a vehicle system.
The script is using some stocks, and so far i fixed some errors; but still getting a few errors.
Im using the function when at OnPlayerConnect, and when i comment the line; it still gives the same error.
Note: The error is still at the same line, when LoadVehicle() is used
As far as i know, i dont have the variable 'name' somewhere in the script.
~Wesley
Im getting a weird error while compiling a vehicle system.
The script is using some stocks, and so far i fixed some errors; but still getting a few errors.
pawn Код:
stock LoadVehicle(vehicle, filename[])
{
new INI:iniid = INI_Open(filename);
CreateVehicleEx(INI_Int("Model", carData[vehicle][model]), // this is the error line (96)
INI_Int("xSpawn", carData[vehicle][xspawn]),
INI_Int("ySpawn", carData[vehicle][yspawn]),
INI_Int("zSpawn", carData[vehicle][zspawn]),
INI_Int("rot", carData[vehicle][anglespawn]),
INI_Int("Col1", carData[vehicle][col1]),
INI_Int("Col2", carData[vehicle][col2]),
INI_Int("respawn" carData[vehicle][respawn]),
INI_String("Owner", carData[vehicle][owner[MAX_PLAYER_NAME]], #MAX_PLAYER_NAME) );
INI_Close(iniid);
return 0;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new file[50];
format( file, sizeof file, "/Vehicles/%i.ini", GetName(playerid) );
LoadVehicle(GetPlayerVehicleID(playerid), file);
return 1;
}
Код:
C:\Users\Wesley\Documents\SA-MP\Veh3(1).pwn(96) : error 029: invalid expression, assumed zero C:\Users\Wesley\Documents\SA-MP\Veh3(1).pwn(96) : error 017: undefined symbol "name" C:\Users\Wesley\Documents\SA-MP\Veh3(1).pwn(96) : error 001: expected token: ";", but found "return" C:\Users\Wesley\Documents\SA-MP\Veh3(1).pwn(96) : fatal error 107: too many error messages on one line
~Wesley