Posts: 1,018
Threads: 320
Joined: Jul 2010
Till this morning I dind't see this error showing in server log:
Run time error 4: "Array index out of bounds"
[10:45:25] [debug] Accessing element at index 65535 past array upper bound 499
[10:45:25] [debug] AMX backtrace:
[10:45:25] [debug] #0 0007d70c in public OnPlayerDeath (0x00000000, 0x0000ffff, 0x000000ff) from GURP.amx
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Check if "killerid" is a valid player (not equal to INVALID_PLAYER_ID) before using it in arrays.
Posts: 1,018
Threads: 320
Joined: Jul 2010
I was know make in pawno folder text file called pawn.cfg and instert in there -d2 and will see where is the problem and can you explain more this Check if "killerid" is a valid player. Thanks
Posts: 1,018
Threads: 320
Joined: Jul 2010
so I just add this if(killerid != INVALID_PLAYER_ID)
{
and here for killerid?
[killerid][Kills]++;
}
outside is go for playerid for example [playerid][Deaths]++;
?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Yes, anything related to killer (arrays etc) should be inside that if statement. About the playerid, outside of it.
Posts: 1,018
Threads: 320
Joined: Jul 2010
and I don't know it is a problem I only have in onplayerdeath this
PlayerInfo[playerid][Kills]++ and like that just instead kills are deaths but I not use that as new kills[max_players].
I only have in enum pinfo Kills,Deaths like that
edit:
and also I was kill my self and again it says [debug] Run time error 4: "Array index out of bounds"
[13:17:02] [debug] Accessing element at index 65535 past array upper bound 499
[13:17:02] [debug] AMX backtrace:
[13:17:02] [debug] #0 0007dc8c in public OnPlayerDeath (0x00000000, 0x0000ffff, 0x000000ff) from GURP.amx