PDA

View Full Version : warning 213: tag mismatch


TheTerminator
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?

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

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

Schneider
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]);

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