[Debug] Error public
#1

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.
Reply
#2

Check if player is in vehicle first.
Reply
#3

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


Forum Jump:


Users browsing this thread: 4 Guest(s)