SA-MP Forums Archive
How to fix Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to fix Errors (/showthread.php?tid=495099)



How to fix Errors - Benac - 16.02.2014

Код:
forward GladanSam();
public GladanSam()
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
		new Float:health;
  		GetProgressBarValue(hungry[playerid] < 10)	    //(46) : warning 213: tag mismatch
		GetPlayerHealth(playerid, health);                       //(47) : error 001: expected token: ";", but found "-identifier-"
		SetPlayerHealth(playerid, health-3);
		UpdateProgressBar(hungry[playerid], playerid);
    }
    return 1;
}



Re: How to fix Errors - silenthill - 16.02.2014

pawn Код:
forward GladanSam();
public GladanSam()
{
    for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
        new Float:health;
        GetProgressBarValue(hungry[playerid] < 10);     //(46) : warning 213: tag mismatch
        GetPlayerHealth(playerid, health);                       //(47) : error 001: expected token: ";", but found "-identifier-"
        SetPlayerHealth(playerid, health-3);
        UpdateProgressBar(hungry[playerid], playerid);
    }
    return 1;
}