[debug] Run time error
#2

pawn Код:
for(new x = 0; x<= MAX_PLAYERS; x++)
to

pawn Код:
for(new x = 0; x < MAX_PLAYERS; x++)

2.

pawn Код:
if(playerdeath[playerid] == 0)
        {
            new Float:HP, Float:AP, Float:remainHP;
            GetPlayerHealthEx(playerid,HP);
            GetPlayerArmourEx(playerid,AP);
            if ( AP >= amount )
            {
                SetPlayerArmourEx( playerid, AP - amount );
                SetPlayerHealthEx( playerid, HP );
            }
            else if ( AP <= 0 )
            {
                remainHP = HP - amount;
                SetPlayerHealthEx( playerid, remainHP );
                if ( remainHP <= 0 && playerdeath[playerid] == 0 )
                {
                    OnPlayerDeath( playerid, issuerid, weaponid );
                    playerdeath[playerid] = 1;
                }
            }
            else
            {
                remainHP = HP + ( AP - amount );
                SetPlayerArmourEx( playerid, 0.0 );
                SetPlayerHealthEx( playerid, remainHP );
                if ( remainHP <= 0 && playerdeath[playerid] == 0 )
                {
                    OnPlayerDeath( playerid, issuerid, weaponid );
                    playerdeath[playerid] = 1;
                }
            }
        }
here issuerid is INVALID_PLAYER_ID you need add
pawn Код:
if(issuerid != INVALID_PLAYER_ID)
before calling
pawn Код:
OnPlayerDeath( playerid, issuerid, weaponid );
Reply


Messages In This Thread
[debug] Run time error - by AlexuTzVs - 17.09.2016, 16:37
Re: [debug] Run time error - by Jefff - 17.09.2016, 16:47
Re: [debug] Run time error - by Konstantinos - 17.09.2016, 16:47
Re: [debug] Run time error - by AlexuTzVs - 17.09.2016, 16:55
Re: [debug] Run time error - by AlexuTzVs - 18.09.2016, 12:46
Re: [debug] Run time error - by Konstantinos - 18.09.2016, 12:48
Re: [debug] Run time error - by AlexuTzVs - 18.09.2016, 13:36

Forum Jump:


Users browsing this thread: 2 Guest(s)