13.02.2017, 15:00
What the others meant was, on the Line number:> 13966 inside gtrg.pwn, you are trying to access an Array Slot (65535) which exceed the mentioned array size..
If a player dies due to his carelessness / fault(Suicide), the killerid in OnPlayerDeath(playerid, killerid, reason), will be INVALID_PLAYER_ID(65535)..
For instance when you have a script to increase the kill count of a player, you must do
Rep+ goes to the above guys who helped. I just rephrased their words.
If a player dies due to his carelessness / fault(Suicide), the killerid in OnPlayerDeath(playerid, killerid, reason), will be INVALID_PLAYER_ID(65535)..
For instance when you have a script to increase the kill count of a player, you must do
PHP Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) { //This will make sure there is no array out of bound due to INVALID_PLAYER_ID
Player_Stats[killerid]++;
}
Player_Stats[playerid]++;
}

