p.pwn(19989) : error 017: undefined symbol "Health" C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(19991) : error 076: syntax error in the expression, or invalid function call C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(19995) : warning 235: public function lacks forward declaration (symbol "hptimer") C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(19997) : error 017: undefined symbol "Health" C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(19999) : error 010: invalid function or declaration
public CheckHealth(playerid) { new Float:health; GetPlayerHealth(playerid,health); if(Health < 20) { hptimer = SetTimer("losehp",1000,true); } return 1; } public hptimer(playerid) { SetPlayerHealth(playerid, Health -5); //player loses 5hp each time the timer is called. } return 1; }
new Float:Health;
public CheckHealth(playerid)
{
GetPlayerHealth(playerid,Health);
if(Health < 20)
{
hptimer = SetTimer("losehp",1000,true);
}
return 1;
}
public losehp(playerid)
{
SetPlayerHealth(playerid, Health -5); //player loses 5hp each time the timer is called.
}
return 1;
}
public CheckHealth(playerid)
{
GetPlayerHealth(playerid,Health);
if(Health < 20)
{
SetTimerEx("losehp",1000,false,"i",playerid);
}
return 1;
}
public losehp(playerid)
{
SetPlayerHealth(playerid, Health -5); //player loses 5hp each time the timer is called.
}
new hptimer; //at the top of script
new Float:Health;
public CheckHealth(playerid)
{
GetPlayerHealth(playerid,Health);
if(Health < 20)
{
hptimer = SetTimer("losehp",1000,true);
}
return 1;
}
forward hptimer(playerid);
public hptimer(playerid)
{
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health -5);
return 1;
}
new Float:health;
new hptimer[MAX_PLAYERS];
public CheckHealth(playerid){
GetPlayerHealth(playerid,health);
if(Health < 20){
hptimer[playerid] = SetTimer("losehp",1000,true);
}
return 1;
}
public losehp(playerid){
SetPlayerHealth(playerid, health-5);
return 1;
}
C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(78185) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(79014) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(79045) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(80720) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(80734) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(80748) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(80762) : warning 219: local variable "Health" shadows a variable at a preceding level C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(81566) : warning 219: local variable "Health" shadows a variable at a preceding level
Yea but when i remove (new Float:Health It give me that Health is undefined in those things..
|