16.01.2014, 12:51
The wiki seems to have a mistake.
This is copied straight from the wiki, just changed the command to OnPlayerUpdate.
Errors appear:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
if (health < 50.0)
{
SetPlayerHealth(playerid, 50.0);
}
return 1;
}
Errors appear:
pawn Код:
E:\SAMP\RPG all\RPG\gamemodes\rc-apo.pwn(848) : warning 219: local variable "health" shadows a variable at a preceding level
E:\SAMP\RPG all\RPG\gamemodes\rc-apo.pwn(849) : error 035: argument type mismatch (argument 2)
E:\SAMP\RPG all\RPG\gamemodes\rc-apo.pwn(850) : warning 213: tag mismatch
E:\SAMP\RPG all\RPG\gamemodes\rc-apo.pwn(850) : warning 206: redundant test: constant expression is non-zero
E:\SAMP\RPG all\RPG\gamemodes\rc-apo.pwn(848) : warning 203: symbol is never used: "health"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.