Error - Causes Players to disconnect
#1

[01:37:26] [debug] Run time error 4: "Array index out of bounds"
[01:37:26] [debug] Accessing element at index 999 past array upper bound 500
[01:37:26] [debug] AMX backtrace:
[01:37:26] [debug] #0 00061c34 in public OnPlayerStateChange () from custom.amx
Reply
#2

Could you post codes from OnPlayerStateChange so we can assist you better
Reply
#3

Код:
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate != 2) NOPTrigger[playerid] = 0;
    if(IsPlayerNPC(playerid))
	{
	    if(newstate == PLAYER_STATE_SPECTATING)
	    {
        	TogglePlayerSpectating(playerid, false);
		}
		return 1;
	}
	if(GettingSpectated[playerid] != 999)
	{
	    new spectator = GettingSpectated[playerid];
	    if(!IsPlayerConnected(spectator))
	    {
	        GettingSpectated[playerid] = 999;
	        Spectate[spectator] = 999;
		}
Reply
#4

Anyone need more info ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)