SA-MP Forums Archive
[Ajuda] Error 001: expected token: ";", but found "return" ? Porque ? - 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] Error 001: expected token: ";", but found "return" ? Porque ? (/showthread.php?tid=436744)



Error 001: expected token: ";", but found "return" ? Porque ? - Alisson Silva Alves - 12.05.2013

pawn Код:
error 001: expected token: ";", but found "return"

pawn Код:
return true;

Como Eu Arrumo Isso Porfavor



Re: Error 001: expected token: ";", but found "return" ? Porque ? - .ThePro - 12.05.2013

Estб faltando algum ponto, mande a linha em que estб o erro!


Re: Error 001: expected token: ";", but found "return" ? Porque ? - Alisson Silva Alves - 12.05.2013

pawn Код:
if(strcmp(cmd, "/darcolete", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /colete [id] [quantia]");
                return true;
            }
            new playa;
            new health;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            health = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
                {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return true;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[giveplayerid][pAdmin] >= 1342 && PlayerInfo[giveplayerid][pAdmin] >= 1341)
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar colete ao Adm Dono!")
                            return true; <~~~~~~~(LINHA DO ERRO)
                        }
                        SetPlayerArmour(playa, health);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }



Re: Error 001: expected token: ";", but found "return" ? Porque ? - .ThePro - 12.05.2013

Tente agora!

Код:
 
if(strcmp(cmd, "/darcolete", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /colete [id] [quantia]");
                return true;
            }
            new playa;
            new health;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            health = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
                {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return true;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[giveplayerid][pAdmin] >= 1342 && PlayerInfo[giveplayerid][pAdmin] >= 1341)
                        {
                            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar colete ao Adm Dono!");
                            return true;
                        }
                        SetPlayerArmour(playa, health);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }



Re: Error 001: expected token: ";", but found "return" ? Porque ? - mau.tito - 12.05.2013

pawn Код:
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar colete ao Adm Dono!")

// Certo
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar colete ao Adm Dono!");