What should this return
#1

Hey,

In the 8months that I have been scripting I have never worked out what I should return however I have this:

pawn Код:
public RapedDamage(playerid)
{
    new Float:H;
    new Float:X, Float:Y, Float:Z;
    if(PlayerIsInfected[playerid] == 1 && PlayerHasCured[playerid] == false) // HIV
    {
        SetPlayerHealth(playerid, GetPlayerHealth(playerid, H) - 5);
        return 1;
    }
    if(PlayerIsInfected[playerid] == 2 && PlayerHasCured[playerid] == false)
    {
        GetPlayerPos(playerid, X, Y, Z);
        SetPlayerPos(playerid, X, Y, Z+8);
        return 1;
    }
    if(PlayerHasCured[playerid] == true)
    {
        KillTimer(RapedTimer[playerid]);
        return 1;
    }
    return 1;
}
I think it should return 1 however as you can see I have return 1 for most things. Would this mean it should return 0??

Thanks,

-Snowman12.
Reply


Messages In This Thread
What should this return - by Snowman12 - 13.01.2012, 09:34
Re: What should this return - by Gh05t_ - 13.01.2012, 10:23
Re: What should this return - by Snowman12 - 13.01.2012, 10:29
Re: What should this return - by Gh05t_ - 13.01.2012, 10:37
Re: What should this return - by Gh05t_ - 13.01.2012, 10:58
Re: What should this return - by Snowman12 - 13.01.2012, 11:05
Re: What should this return - by Gh05t_ - 13.01.2012, 11:23
Re: What should this return - by iPLEOMAX - 13.01.2012, 11:35

Forum Jump:


Users browsing this thread: 2 Guest(s)