Wiki mistake?
#1

The wiki seems to have a mistake.

pawn Код:
public OnPlayerUpdate(playerid)
    {
        new Float:health;
        GetPlayerHealth(playerid,health);
        if (health < 50.0)
        {
            SetPlayerHealth(playerid, 50.0);
        }
        return 1;
    }
This is copied straight from the wiki, just changed the command to OnPlayerUpdate.

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.
Reply


Messages In This Thread
Wiki mistake? - by [WA]iRonan - 16.01.2014, 12:51
Re: Wiki mistake? - by Konstantinos - 16.01.2014, 12:57
Re: Wiki mistake? - by Zex Tan - 16.01.2014, 12:58
Re: Wiki mistake? - by [WA]iRonan - 16.01.2014, 12:59
Re: Wiki mistake? - by erminpr0 - 16.01.2014, 13:03
Re: Wiki mistake? - by Zex Tan - 16.01.2014, 13:07
Re: Wiki mistake? - by Konstantinos - 16.01.2014, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)