#1

If I type /kill I get this errors:
Code:
[13:28:18] [debug] Run time error 4: "Array index out of bounds"
[13:28:18] [debug]  Accessing element at index 65535 past array upper bound 199
[13:28:18] [debug] AMX backtrace:
[13:28:18] [debug] #0 00062a48 in public L_AFK_OPD (playerid=0, killerid=65535, reason=255) at C:\Documents and Settings\Nikola\Desktop\mode\gamemodes\mode.pwn:8829
[13:28:18] [debug] #1 native CallLocalFunction () from sampsvr-port_9856
[13:28:18] [debug] #2 00010ca8 in public FC_OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Documents and Settings\Nikola\Desktop\mode\pawno\include\AutoAFK.inc:110
[13:28:18] [debug] #3 native CallLocalFunction () from sampsvr-port_9856
[13:28:18] [debug] #4 000022fc in public OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Documents and Settings\Nikola\Desktop\mode\pawno\include\fuckcleo_-_include.inc:157
Line of errors:
1.
Code:
KillingSpree[killerid]++;
2.
Code:
CallLocalFunction("L_AFK_OPD", "iii", playerid, killerid, reason);
3.
Code:
return ( FC_OPD ) ? CallLocalFunction( "FC_OnPlayerDeath", "ddd", playerid, killerid, reason ) : 1;
Reply
#2

Check if the killerid is a valid id

Code:
if(killerid != INVALID_PLAYER_ID)
{
    KillingSpree[killerid] ++;
}
Reply
#3

Hello!

PHP Code:
if(killerid != INVALID_PLAYER_ID)
{
    
KillingSpree[killerid] ++;

PHP Code:
if(killerid != INVALID_PLAYER_ID)
{
    
CallLocalFunction("L_AFK_OPD","iii",playerid,killerid,reason);

PHP Code:
if(killerid != INVALID_PLAYER_ID)
{
    return (
FC_OPD) ? (CallLocalFunction("FC_OnPlayerDeath","iii",playerid,killerid,reason)) : (1);

- Mencent
Reply
#4

Here's it:
Code:
 if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
Reply
#5

Then you have to give us the whole code so that we can see a lot of more code.


- Mencent
Reply
#6

Code:
public OnPlayerDeath(playerid, killerid, reason){

        SendDeathMessage(killerid, playerid, reason);
        if(DM_InDM[playerid] >= 1) RemoveL_eTD(playerid);
 	if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
 	{
		if(!IsPlayerInAnyVehicle(killerid))
		{
			if(DM_InDM[killerid] >= 1 && DM_InDM[playerid] >= 1)
			{
				//some codes
			}
		}	
	}
	if(SPInstunt[playerid] == 1) SPInstunt[playerid] = 0;
        if(Joined[playerid] == true)
        {
           //some codes
	}
       //killing spreee
       KillingSpree[playerid] = 0;
       KillingSpree[killerid]++;
Reply
#7

Check if "killerid != INVALID_PLAYER_ID" before doing anything with it on your kill command.
Reply
#8

Quote:
Originally Posted by xVIP3Rx
View Post
Check if "killerid != INVALID_PLAYER_ID" before doing anything with it on your kill command.
Same.
Reply
#9

Show me your "/kill command"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)