SA-MP Forums Archive
[Ajuda] warning 213: tag mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] warning 213: tag mismatch (/showthread.php?tid=347619)



[Ajuda] warning 213: tag mismatch - Don_Speed - 02.06.2012

@corrigido Vlw a Todos


Re: [Ajuda] warning 213: tag mismatch - ViniBorn - 02.06.2012

pawn Code:
new ID;
if(sscanf(params, "rd", ID, moneys))



Re: [Ajuda] warning 213: tag mismatch - EditPawn - 02.06.2012

ve se da certo, vi alguns erros no cmd....

pawn Code:
CMD:pagar(playerid,params[])
{
    new ID, string[100], moneys;
    if(sscanf(params, "ud", ID, moneys))
        return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO

    if (!IsPlayerConnected(ID))
        return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO

    if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");

    if (moneys < 1 || moneys > 99999)
        return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");

    if (PlayerInfo[playerid][pLocal] == 106)
        return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");

    if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO

    if (ProxDetectorS(5.0, playerid, ID))//AVISO
    {
        new sendername[MAX_PLAYER_NAME], givename[MAX_PLAYER_NAME], pmoney;
        GetPlayerName(ID, givename, sizeof(givename));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        pmoney = GetPlayerMoney(playerid);
        if (pmoney <= moneys)
            return SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo possui essa grana.");

        ConsumingMoney[ID] = 1;//AVISO
        GivePlayerMoney(playerid, -moneys));
        GivePlayerMoney(ID, moneys);//AVISO
        format(string, sizeof(string), "    Vocк pagou $%d para %s.", moneys, givename);
        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, COLOR_GRAD1, string);
        format(string, sizeof(string), "   Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
        SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
        format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, givename);
        PayLog(string);
        if(moneys >= 1000000)
        {
            ABroadCast(COLOR_YELLOW,string,1);
        }
        PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
        format(string, sizeof(string), "* %s Pagou para %s.", sendername, givename);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe");
    return 1;
}
@EDIT

Do tipo
Vc definiu a var Name sу que nao usou ela, e usou a sendername
Outra que vc nao criou uma para o ID e tentou usar uma q nao existia que era a Name definida ali em cima.....
e arrumei tbm o GivePlayerMoneyEx, e troquei por GivePlayerMoney..

Acho que foi isso rsrs ^^


Re: [Ajuda] warning 213: tag mismatch - Don_Speed - 02.06.2012

Vini Olha So os Avisos Que Fica
pawn Code:
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46923) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46924) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46925) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46929) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46929) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46930) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46936) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46938) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46943) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46950) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46923) : warning 203: symbol is never used: "ID"
Comando Utilizado
pawn Code:
CMD:pagar(playerid,params[])
{
   new string[100], moneys, ID;
   if(sscanf(params, "rd", ID, moneys))return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO
   if (!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO
   if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");
   if (moneys < 1 || moneys > 99999)return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");
   if (PlayerInfo[playerid][pLocal] == 106)return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");
   if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO
   if (ProxDetectorS(5.0, playerid, ID))//AVISO
   {
       new Name[MAX_PLAYER_NAME];
       //GetPlayerName(ID, Name, sizeof(Name));
       GetPlayerName(playerid, sendername, sizeof(sendername));
       if (moneys > 0 && moneys >= moneys)return SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo possui essa grana.");
       ConsumingMoney[ID] = 1;//AVISO
       GivePlayerMoneyEx(playerid, (0 - moneys));
       GivePlayerMoneyEx(ID, moneys);//AVISO
       format(string, sizeof(string), "    Vocк pagou $%d para %s.", moneys, Name);
       PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
       SendClientMessage(playerid, COLOR_GRAD1, string);
       format(string, sizeof(string), "   Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
       SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
       format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, Name);
       PayLog(string);
       if(moneys >= 1000000)
       {
            ABroadCast(COLOR_YELLOW,string,1);
       }
       PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
       format(string, sizeof(string), "* %s Pagou para %s.", sendername ,Name);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
   }else{ SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe"); }
   return 1;
}



Re: [Ajuda] warning 213: tag mismatch - EditPawn - 02.06.2012

Ve se o meu da certo Don /\


Re: [Ajuda] warning 213: tag mismatch - Don_Speed - 02.06.2012

Quote:
Originally Posted by EditPawn
View Post
Ve se o meu da certo Don /\
nds ainda msm coisa


Re: [Ajuda] warning 213: tag mismatch - EditPawn - 02.06.2012

Quote:
Originally Posted by Don_Speed
View Post
nds ainda msm coisa
eu testei aki funcionou perfeitamente, se der erro, й as linhas acima desse comando ou falta alguma var, etc....


pawn Code:
CMD:pagar(playerid,params[])
{
    new ID, string[100], moneys;
    if(sscanf(params, "ud", ID, moneys))
        return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO

    if (!IsPlayerConnected(ID))
        return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO

    if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");

    if (moneys < 1 || moneys > 99999)
        return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");

    if (PlayerInfo[playerid][pLocal] == 106)
        return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");

    if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO

    if (ProxDetectorS(5.0, playerid, ID))//AVISO
    {
        new sendername[MAX_PLAYER_NAME], givename[MAX_PLAYER_NAME], pmoney;
        GetPlayerName(ID, givename, sizeof(givename));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        pmoney = GetPlayerMoney(playerid);
        if (pmoney < moneys)
            return SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo possui essa grana.");

        ConsumingMoney[ID] = 1;//AVISO
        GivePlayerMoney(playerid, -moneys);
        GivePlayerMoney(ID, moneys);//AVISO
        format(string, sizeof(string), "    Vocк pagou $%d para %s.", moneys, givename);
        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, COLOR_GRAD1, string);
        format(string, sizeof(string), "   Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
        SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
        format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, givename);
        PayLog(string);
        if(moneys >= 1000000)
        {
            ABroadCast(COLOR_YELLOW,string,1);
        }
        PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
        format(string, sizeof(string), "* %s Pagou para %s.", sendername, givename);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe");
    return 1;
}



Re: [Ajuda] warning 213: tag mismatch - Don_Speed - 02.06.2012

Quote:
Originally Posted by EditPawn
View Post
eu testei aki funcionou perfeitamente, se der erro, й as linhas acima desse comando ou falta alguma var, etc....


pawn Code:
CMD:pagar(playerid,params[])
{
    new ID, string[100], moneys;
    if(sscanf(params, "ud", ID, moneys))
        return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO

    if (!IsPlayerConnected(ID))
        return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO

    if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");

    if (moneys < 1 || moneys > 99999)
        return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");

    if (PlayerInfo[playerid][pLocal] == 106)
        return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");

    if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)
        return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO

    if (ProxDetectorS(5.0, playerid, ID))//AVISO
    {
        new sendername[MAX_PLAYER_NAME], givename[MAX_PLAYER_NAME], pmoney;
        GetPlayerName(ID, givename, sizeof(givename));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        pmoney = GetPlayerMoney(playerid);
        if (pmoney < moneys)
            return SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo possui essa grana.");

        ConsumingMoney[ID] = 1;//AVISO
        GivePlayerMoney(playerid, -moneys);
        GivePlayerMoney(ID, moneys);//AVISO
        format(string, sizeof(string), "    Vocк pagou $%d para %s.", moneys, givename);
        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, COLOR_GRAD1, string);
        format(string, sizeof(string), "   Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
        SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
        format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, givename);
        PayLog(string);
        if(moneys >= 1000000)
        {
            ABroadCast(COLOR_YELLOW,string,1);
        }
        PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
        format(string, sizeof(string), "* %s Pagou para %s.", sendername, givename);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe");
    return 1;
}
Compilou Assim:
pawn Code:
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46979) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46982) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46997) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46999) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47000) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47006) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47008) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47013) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47020) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 203: symbol is never used: "ID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          11620 bytes
Code size:          2022232 bytes
Data size:          7998028 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7447 cells (29788 bytes)
Total requirements:10048264 bytes

13 Warnings.
Isso Pode Ser Causado Por Ter Comandos em zcmd e strcmp ?? Pq Testei Outro cmd Qu Eu Usei o sscanf e zcmd Deu os Mesmos Avisos, Pode Ser Isso?


Re: [Ajuda] warning 213: tag mismatch - CidadeNovaRP - 02.06.2012

Quote:
Originally Posted by Don_Speed
View Post
Compilou Assim:
pawn Code:
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46979) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46982) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46997) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46999) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47000) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47006) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47008) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47013) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47020) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 203: symbol is never used: "ID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          11620 bytes
Code size:          2022232 bytes
Data size:          7998028 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7447 cells (29788 bytes)
Total requirements:10048264 bytes

13 Warnings.
Isso Pode Ser Causado Por Ter Comandos em zcmd e strcmp ?? Pq Testei Outro cmd Qu Eu Usei o sscanf e zcmd Deu os Mesmos Avisos, Pode Ser Isso?
Claro 00' Onde jб se viu usar ZCMD+STRCMP?


Re: [Ajuda] warning 213: tag mismatch - 'Duallity - 02.06.2012

Vc sу usa ZCMD ??