SA-MP Forums Archive
[Debug] Error public - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Debug] Error public (/showthread.php?tid=381510)



[Debug] Error public - PryX0G3n - 29.09.2012

Hi guys,How to resolve this?

Код:
[20:53:18] [debug] Run time error 4: "Array index out of bounds"
[20:53:18] [debug]  Accessing element at negative index -400
[20:53:18] [debug] AMX backtrace:
[20:53:18] [debug] #0 001669f4 in ?? () from gmfreeroam.amx
[20:53:18] [debug] #1 0016690c in public CheckForChange () from gmfreeroam.amx
my callback :

Код:
public CheckForChange(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != VehicleModel[playerid])
{
VehicleModel[playerid] = GetVehicleModel(GetPlayerVehicleID(playerid));
ShowGameTextForPlayer(playerid);
}

return 1;
}
Thanks in advance.


Re: [Debug] Error public - Vince - 29.09.2012

Check if player is in vehicle first.


Re: [Debug] Error public - PryX0G3n - 29.09.2012

using IsPlayerInAnyVehicle i is not giving more errors, thank you vince.