16.06.2012, 18:52
(
Последний раз редактировалось a!DaN)_)-); 16.06.2012 в 19:31.
)
Hey im fairly new to enum so.. Could someone take at look at these errors ill give you the part of the code with the error and the enum.
This is the code from the errors.
This is the enum.
And these are the errors.
Код:
case 1: { if(PlayerInfo[playerid][PlayerVehicleModel1] != 0) { PlayerVehicleID1[playerid] = 0; PlayerVehicleID1[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel1], PlayerInfo[playerid][PlayerVehiclePosX1], PlayerInfo[playerid][PlayerVehiclePosY1], PlayerInfo[playerid][PlayerVehiclePosZ1], PlayerInfo[playerid][PlayerVehicleFacing1], PlayerInfo[playerid][pPlayerVehicle1Color], PlayerInfo[playerid][pPlayerVehicle1Color2], -1); Line 3641 ---> vehInfo[PlayerVehicleID1[playerid]][VehicleDealership] = 1; vehInfo[PlayerVehicleID1[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock1]; vehInfo[PlayerVehicleID1[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked1]; SetVehicleVirtualWorld(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1VirWorld]); LinkVehicleToInterior(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1Interior]); strmid(vehInfo[PlayerVehicleID1[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255); if(PlayerInfo[playerid][pVehLock1] == 1) { if(PlayerInfo[playerid][pVehLocked1] == 1) { LockCar(PlayerVehicleID1[playerid]); } else { UnLockCar(PlayerVehicleID1[playerid]); } }
Код:
enum vehInfo { VehicleOwner[256], VehicleLock, VehicleLocked, VehicleDealership }; new vehicleInfo[MAX_CARS][vehInfo];
Код:
LSLRP.pwn(3641) : error 028: invalid subscript (not an array or too many subscripts): "vehInfo" C:\Users\Jacko\Documents\John\John\gamemodes\LSLRP.pwn(3641) : warning 215: expression has no effect C:\Users\Jacko\Documents\John\John\gamemodes\LSLRP.pwn(3641) : error 001: expected token: ";", but found "]" C:\Users\Jacko\Documents\John\John\gamemodes\LSLRP.pwn(3641) : error 029: invalid expression, assumed zero C:\Users\Jacko\Documents\John\John\gamemodes\LSLRP.pwn(3641) : fatal error 107: too many error messages on one line