Help:
#1

I get "error 025: function heading differs from prototype" on the following code. Whats wrong? And how can I fix it?


Code: (Error on line OnPlayerTakeDamage)
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)//Called when a player takes damage
{
    new Float:hp;
    GetPlayerHealth(playerid, hp); //Get the player's health
    if(hp < 40.0) //If their health is lower than 40
    {
        if(Dying[playerid] == 0) //If they are not already dying (We don't want to set a timer twice)
        {
             SetTimerEx("DeathTimer", 3000, true, "i", playerid); //Set a timer every 3 seconds to go off (repeating)
             Dying[playerid] = 1; //They are now dying
             SendClientMessage(playerid, 0xFF0000FF, "You are injured and are losing health slowly. You need a medic!"); //Change this message however you want, or remove it, the choice is yours
        }
    }
    return 1;
}

Thanks in advance!
Reply


Messages In This Thread
Help: function heading differs from prototype - by jakejohnsonusa - 13.01.2013, 12:27
Re: Help: - by TJKeeran - 13.01.2013, 14:38
Re: Help: - by jakejohnsonusa - 13.01.2013, 14:38
Re: Help: - by TJKeeran - 13.01.2013, 14:44
Re: Help: - by jakejohnsonusa - 13.01.2013, 14:57

Forum Jump:


Users browsing this thread: 2 Guest(s)