Wierd AMX backtrace error
#1

This is spamming in mine server_log each second, and it also causes lag.


The AMX backtrace

Код:
[19:13:10] [debug] AMX backtrace:
[19:13:10] [debug] #0 00170934 in ?? (0x00000015) from ZRP.amx
[19:13:10] [debug] #1 0016c7a4 in public NOPSetPlayerPos () from ZRP.amx
[19:13:11] [debug] Run time error 4: "Array index out of bounds"
[19:13:11] [debug]  Accessing element at index 9 past array upper bound 8
This is what I have under gamemode init
Код:
SetTimer("NOPSetPlayerPos", 1000, true);
The function
Код:
forward NOPSetPlayerPos();
public NOPSetPlayerPos()
{
    // NOP Vehicle Cheat
    foreach(new i : Player)
    {
	    if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
		{
		    if(IsLeoVehicle(GetPlayerVehicleID(i)) && PlayerInfo[i][pFac] != 1 || IsTruckerVehicle(GetPlayerVehicleID(i)) && PlayerInfo[i][pJob] != JOB_TRUCKER)
		    {
			    new string[128];
			    format(string, sizeof(string), "AdmWarn: %s is either desynced or using NOP hacks. (Driving Restricted Vehicle)", RPN(i));
			    SendAdminMessage(COLOR_DARKRED, 1, string);
			    RemovePlayerFromVehicle(i);
		    }
		}
	}
	return 1;
}
Reply
#2

The stock functions may cause the lag or crash, try fixing them or post here.
Reply
#3

You should really compile with -d3: https://github.com/Zeex/samp-plugin-...ith-debug-info

It might caused from a function inside NOPSetPlayerPos and at the moment, the information crashdetect gave are not all. Post IsLeoVehicle and IsTruckerVehicle functions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)