SA-MP Forums Archive
Tagmismatch?? What is it? - 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: Tagmismatch?? What is it? (/showthread.php?tid=465797)



Tagmismatch?? What is it? - MAFIAWARS - 24.09.2013

Hello! So Basically I am putting the command /armour, that is:

pawn Код:
CMD:armour(playerid, params[])
{

    if(pInfo[playerid][pAdminLevel] > 1)
    {
        new id,amount;
        if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid, COLOR_RED1, "[ ! ] USAGE: /armour <playerid> <amount>");
        if(!IsPlayerConnected(id))return SendClientMessage (playerid, COLOR_WHITE, "[ ! ] ERROR: Invalid Player Id");
        SendClientMessage(playerid, COLOR_RED1, "[ ! ] Your Armour Set !");
        SetPlayerArmour(id,amount);
    }
    return 1;
}
But Is giving two warnings on the Same Line.

pawn Код:
E:\SCRIPT\gamemodes\Dafuq.pwn(713) : warning 213: tag mismatch
E:\SCRIPT\gamemodes\Dafuq.pwn(713) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
Line Number 713 is"

pawn Код:
if(pInfo[playerid][pAdminLevel] > 1)
Thanks in Advance.


Re: Tagmismatch?? What is it? - iZN - 24.09.2013

How pInfo is defined?


Re: Tagmismatch?? What is it? - MAFIAWARS - 24.09.2013

It is defined like that:

pawn Код:
new pInfo[MAX_PLAYERS][PlayerInfo];



enum pInfo_
{
    bool:pAdminColor,
    bool:pAdminLevel,
}



Re: Tagmismatch?? What is it? - Misiur - 24.09.2013

Bool has only values of true or false, and you need normal number. Change boolAdminLevel to pAdminLevel


Re: Tagmismatch?? What is it? - Konstantinos - 24.09.2013

So.. your enum is PlayerInfo or pInfo_?

By the way, using tag bool: makes it boolean and can get values false, true only.

Just use it as AdminLevel.


Re: Tagmismatch?? What is it? - MAFIAWARS - 24.09.2013

Still Receiving the Same Warning.


Re: Tagmismatch?? What is it? - MAFIAWARS - 24.09.2013

Fixed. Thank you All !