SA-MP Forums Archive
Warning! Bar - 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: Warning! Bar (/showthread.php?tid=653534)



Warning! Bar - KamilPolska - 06.05.2018

How to fix the warning: warning 213: tag mismatch
Warning code: SetProgressBarValue(Bar0[playerid], hp);
Код:
#include <a_samp>
#include <progress2>

new PlayerBar:Bar0[MAX_PLAYERS];

new ProgressTimer[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    Bar0[playerid] = CreatePlayerProgressBar(playerid, 552.000000, 67.000000, 55.500000, 1.200000, -16776961, 100.0000, 0);

    return 1;
}

public OnPlayerSpawn(playerid)
{
    ShowPlayerProgressBar(playerid, Bar0[playerid]);

    ProgressTimer[playerid] = SetTimerEx("barSS", 100, true, "i", playerid);

    return 1;
}

forward barSS(playerid);
public barSS(playerid) 
{
	new Float:hp;
    hp = GetPlayerHealth(playerid, hp);
    SetProgressBarValue(Bar0[playerid], hp);
}



Re: Warning! Bar - Lokii - 06.05.2018

Change:

PHP код:
SetProgressBarValue(Bar0[playerid], hp); 
to

PHP код:
SetPlayerProgressBarValue(playeridBar0[playerid], hp); 



Re: Warning! Bar - KamilPolska - 06.05.2018

Thank you!


Re: Warning! Bar - KamilPolska - 06.05.2018

removed