warning 202: number of arguments does not match definition
#1

PHP код:
forward Regener(playerid);
public 
Regener(playerid)
{
    
SetPlayerHealth(playerid,GetPlayerHealth(playerid)+Regen[playerid]);
    
Regen[playerid] = 0;
    
KillTimer(RTimer);
    return 
1;} 
what is this warning
PHP код:
C:\Documents and Settings\user\Desktop\zombierpg.pwn(301) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Warning

the line 301 is SetPlayerHealth(playerid,GetPlayerHealth(playerid) +Regen[playerid]); why give me warning
Reply
#2

I'm not sure it matters with tag mismatch but have you tried placing a space either side of the '+' ?
Reply
#3

https://sampwiki.blast.hk/wiki/GetPlayerHealth
Reply
#4

In pawno as you type any function, after bracket it will show the arguments.



In this case there's missing &Float:health.
Reply
#5

pawn Код:
forward Regener(playerid);

public Regener(playerid)
{
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    SetPlayerHealth(playerid,Health+Regen[playerid]);
    Regen[playerid] = 0;
    KillTimer(RTimer);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)