Warning! Bar
#1

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);
}
Reply
#2

Change:

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

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

Thank you!
Reply
#4

removed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)