Warning: Tag Mismatch - 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: Tag Mismatch (
/showthread.php?tid=399192)
Warning: Tag Mismatch -
Lz - 13.12.2012
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?
Re: Warning: Tag Mismatch -
[HK]Ryder[AN] - 13.12.2012
it should be
pawn Код:
if(PlayerInfo[playerid][pAdmin] != 1)
playerid comes before the variable
Re: Warning: Tag Mismatch -
ikey07 - 13.12.2012
Switch in places pAdmin and playerid
Re: Warning: Tag Mismatch -
Lz - 13.12.2012
Thanks so much! Both rep++
Re: Warning: Tag Mismatch -
maramizo - 13.12.2012
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.