View Full Version : warning 213: tag mismatch

18/01/2015, 09:56 PM
pwn(1071) : warning 213: tag mismatch

new Food[MAX_PLAYERS];

GetPlayerProgressBarValue(playerid, Food[playerid]);

For the life of me I can't find what tag mismatch means, or how to fix it... Someone, please?

18/01/2015, 09:59 PM
That second parameter represents the progressbar-id.
Also GetPlayerProgressBarValue returns a float, not an integer.

18/01/2015, 10:04 PM
Nothing I've tried works

new Food[MAX_PLAYERS];
GetPlayerProgressBarValue(playerid, Food[playerid]);
SetPlayerProgressBarValue(playerid, Food[playerid], -1);

Here's the code, please just post the fix and I'll study from it..

18/01/2015, 10:18 PM
new PlayerBar:Food[MAX_PLAYERS];

Food[playerid] = CreatePlayerProgressBar(playerid, 570.0, 105.0, 55.5, 3.2, yellow, 100.0, BAR_DIRECTION_RIGHT);
SetPlayerProgressBarValue(playerid, Food[playerid], PlayerInfo[playerid][pHunger]);
ShowPlayerProgressBar(playerid, Food[playerid]);

new Float:value;
value = GetPlayerProgressBarValue(playerid, Food[playerid]);

18/01/2015, 10:24 PM
Thank you for your help and patience, repped!