Warning: Tag Mismatch
#1

I persistently get this warning whenever i use a if sentence like:

pawn Код:
if(PlayerInfo[pAdmin][playerid] != 1)
Can anybody explain this to me please?
Reply
#2

it should be
pawn Код:
if(PlayerInfo[playerid][pAdmin] != 1)
playerid comes before the variable
Reply
#3

Switch in places pAdmin and playerid
Reply
#4

Thanks so much! Both rep++
Reply
#5

At the enum definition, you would find a:
pawn Код:
enum pExample
{
    pAdmin,
    pAdminName,
    pAdminLevel,
    pLevel,
    pConnectTime,
    pEtc
}
new PlayerInfo[MAX_PLAYERS+1][pExample];
The MAX_PLAYERS+1 array stores the playerid ID's, as it creates an array with the size of the maximum online players, so that each online player can have his own enum of information which in this case is pExample.

If it was defined as:
pawn Код:
new PlayerInfo[pExample][MAX_PLAYERS+1];
Then it would have not returned the error that you recieve in the first place.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)