OnPlayerDeath debug error
#1

Guys,
Another problem. The crashdetect plugin is reading a Debug on OnPlayerDeath. I dont see whats wrong here. The onplayedeath callback consists the Register and a piece from the Spectate system.

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    if(IsBeingSpeced[playerid] == 1)//If the player being spectated, dies, then turn off the spec mode for the spectator.
    {
        foreach(Player,i)
        {
            if(spectatorid[i] == playerid)
            {
                TogglePlayerSpectating(i,false);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
            }
        }
    }
    return 1;
    }
Reply
#2

Can you show us what the crashdetect shows?
Reply
#3

pawn Код:
[18:03:53] [debug] #0 0000ae80 in public OnPlayerDeath () from systema.amx
Reply
#4

I'm not really sure, but check if the killer is valid player.
pawn Код:
if( killerid != INVALID_PLAYER_ID ) PlayerInfo[ killerid ][ pKills ]++;
And tell me if it shows that message again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)