Array index out of bounds -- HELP PLS
#1

hi! so, i typed some codes on player death , but some of them will not work ! and i get this lines on samp-server.exe
:
Code:
[13:00:43] [debug] Run time error 4: "Array index out of bounds"
[13:00:43] [debug]  Attempted to read/write array element at index 99 in array of size 16
[13:00:43] [debug] AMX backtrace:
[13:00:43] [debug] #0 000df064 in public FailRob (0, 1) in BlankScript.amx
[13:00:43] [debug] #1 000df330 in public AB_OnPlayerDeath (0, 65535, 255) in BlankScript.amx
[13:00:43] [debug] #2 00035f24 in public OnPlayerDeathWeapons (0, 65535, 255) in BlankScript.amx
[13:00:43] [debug] #3 000319f0 in public ac_OnPlayerDeath (0, 65535, 255) in BlankScript.amx
[13:00:43] [debug] #4 0000d348 in public OnPlayerDeath (0, 65535, 255) in BlankScript.amx
here is onplayerdeath code :

Code:
new Robber[MAX_PLAYERS];
new BankRobber[MAX_PLAYERS];
	public OnPlayerDeath(playerid, killerid, reason)
	{
	    if(Robber[playerid] != 0)
	    {
			Robber[playerid] = 0;
			
		 	if(BankRobber[playerid] == 1)
		    {
		        BankRobber[playerid] = 0;
			FailRob(playerid,1);
		    }
	    }
         return 1;
       }
and the FailRob Public:
Code:
forward FailRob(playerid,robid);

public FailRob(playerid,robid)
{
	if(robid == 1)
	{
		        SendClientMessageToAll(-1,"Test String"); // worked!
				DestroyDynamicCP(RobCps[playerid]); // not worked!
				//
				HideTimer(playerid); // not worked (this stock should hide some textdraws)
	}
    return 1;
}
i tried to use failrob public codes in onplayerdeath to but not worked again and show same errors help me please!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)