number of arguments does not match definition,IF statement
#1

pawn Код:
public CheckPlayerInBank(playerid)
    {
        new playerInteriorBank;
        playerInteriorBank = GetPlayerInterior(playerid);
        if(playerInteriorBank!=2)
        {
            SendClientMessageToAll(COLOR_HOTORANGE, "The man who attempted to rob the bank has failed to do so,as he quit the bank.");
            bankBeingRobbed=0;
        }
        else if(GetPlayerHealth(playerid)==0.0)//THIS LINE
        {
            SendClientMessageToAll(COLOR_HOTORANGE, "The man who attempted to rob the bank has failed to do so,as he has been killed");
            bankBeingRobbed=0;
        }
        return 1;
    }
warning:number of arguments does not match definition

But it's an if statement?
Reply
#2

You missed a parameter on GetPlayerHealth(..., ...);

pawn Код:
forward CheckPlayerInBank(playerid);
public CheckPlayerInBank(playerid)
{
    new playerInteriorBank, Float:Health;
    playerInteriorBank = GetPlayerInterior(playerid);
    GetPlayerHealth(playerid, Health);

    if(playerInteriorBank != 2)
    {
        SendClientMessageToAll(COLOR_HOTORANGE, "The man who attempted to rob the bank has failed to do so,as he quit the bank.");
        bankBeingRobbed=0;
    }
    else if(Health == 0.0)
    {
        SendClientMessageToAll(COLOR_HOTORANGE, "The man who attempted to rob the bank has failed to do so,as he has been killed");
        bankBeingRobbed=0;
    }
    return 1;
}
Reply
#3

Ah.Thanks,i though i only need the playerid param,as it's the only one it is suggested when i type
GetPlayerHealth(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)