[debug] Run time error 4: "Array index out of bounds" [READ FOR MORE INFO]
#4

Because you did:
pawn Код:
new cdveh = GetPlayerVehicleID(MAX_PLAYERS);
when it should be "playerid" instead of "MAX_PLAYERS" and cdveh is 0 and then using:
pawn Код:
GetVehicleName(cdveh)
will cause the run time error because you basically do: 0-400 which results to a negative index. You must check if the modelid is not 0 and subtract.
Reply


Messages In This Thread
[debug] Run time error 4: "Array index out of bounds" [READ FOR MORE INFO] - by Trynda - 15.05.2014, 07:00
Re: [debug] Run time error 4: "Array index out of bounds" [READ FOR MORE INFO] - by VishvaJeet - 15.05.2014, 07:44
Re: [debug] Run time error 4: "Array index out of bounds" [READ FOR MORE INFO] - by Vince - 15.05.2014, 08:23
Re: [debug] Run time error 4: "Array index out of bounds" [READ FOR MORE INFO] - by Konstantinos - 15.05.2014, 10:28

Forum Jump:


Users browsing this thread: 1 Guest(s)