[AJUDA] Dando uns erros aqui :/
#1

ERROS:
pawn Код:
C:\Users\Cliente\Desktop\BGS.pwn(103) : error 017: undefined symbol "cmd"
C:\Users\Cliente\Desktop\BGS.pwn(105) : error 017: undefined symbol "tmp"
C:\Users\Cliente\Desktop\BGS.pwn(105) : error 017: undefined symbol "strtok"
C:\Users\Cliente\Desktop\BGS.pwn(106) : warning 219: local variable "PlayerB" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BGS.pwn(107) : error 017: undefined symbol "tmp"
C:\Users\Cliente\Desktop\BGS.pwn(108) : error 017: undefined symbol "tmp"
C:\Users\Cliente\Desktop\BGS.pwn(133) : warning 217: loose indentation
C:\Users\Cliente\Desktop\BGS.pwn(135) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(139) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(142) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(143) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(145) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(149) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(151) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(153) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(157) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(159) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(161) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(165) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(167) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(169) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(172) : error 021: symbol already defined: "PlayerB"
C:\Users\Cliente\Desktop\BGS.pwn(173) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(175) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(177) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(179) : error 010: invalid function or declaration
C:\Users\Cliente\Desktop\BGS.pwn(180) : error 021: symbol already defined: "string"
C:\Users\Cliente\Desktop\BGS.pwn(181) : error 021: symbol already defined: "GetPlayerName"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/convidar", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB;
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /convidar [id]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, Branco, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][PMilitar] >= 6)
        {
            PlayerInfo[PlayerB][PMilitar] = 1;
            SendClientMessage(PlayerB, Branco, "Vocк entrou а Polнcia Militar");
            SetPlayerColor(PlayerB, Cor_PMilitar);
            return 1;
        }
        else if(PlayerInfo[playerid][Groove] >= 6)
        {
            PlayerInfo[PlayerB][Groove] = 1;
            SendClientMessage(PlayerB, Branco, "Vocк entrou а Groove");
            SetPlayerColor(PlayerB, Cor_Groove);
            return 1;
        }
        else if(PlayerInfo[playerid][Ballas] >= 6)
        {
            PlayerInfo[PlayerB][Ballas] = 1;
            SendClientMessage(PlayerB, Branco, "Vocк entrou aos Ballas");
            SetPlayerColor(PlayerB, Cor_Ballas);
            return 1;
        }
        return 1;
    }
        return 1;
    }
if(strcmp(cmd, "/demitir", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, string[128], demitidor[MAX_PLAYER_NAME];
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /demitir [id]");
        PlayerB = strval(tmp);
        GetPlayerName(playerid, demitidor, sizeof(demitidor));
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, Branco, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][PMilitar] >= 6)
        {
            if(PlayerInfo[PlayerB][PMilitar] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua organizaзгo");
            PlayerInfo[PlayerB][PMilitar] = 0;
            format(string, sizeof(string), "Vocк foi demitido por %s", demitidor);
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        else if(PlayerInfo[playerid][Groove] >= 6)
        {
            if(PlayerInfo[PlayerB][Groove] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua organizaзгo");
            PlayerInfo[PlayerB][Groove] = 0;
            format(string, sizeof(string), "Vocк foi demitido por %s", demitidor);
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        else if(PlayerInfo[playerid][Ballas] >= 6)
        {
            if(PlayerInfo[PlayerB][Ballas] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua organizaзгo");
            PlayerInfo[PlayerB][Ballas] = 0;
            format(string, sizeof(string), "Vocк foi demitido por %s", demitidor);
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        return 1;
    }
if(strcmp(cmd, "/promover", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, level;
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /promover [id] [cargo]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, Branco, "Este jogador nгo estб conectado");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /promover [id] [cargo]");
        level = strval(tmp);
        if(level < 1 || level > 6) return SendClientMessage(playerid, Branco, "O level deve ser maior que 0 e menor que 7");
        new string[128], promovedor[MAX_PLAYER_NAME];
        GetPlayerName(playerid, promovedor, sizeof(promovedor));
        if(PlayerInfo[playerid][PMilitar] >= 6)
        {
            if(PlayerInfo[PlayerB][PMilitar] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua org");
            PlayerInfo[PlayerB][PMilitar] = level;
            format(string, sizeof(string), "Vocк foi promovido a level %d por %s", level, promovedor););
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        else if(PlayerInfo[playerid][Groove] >= 6)
        {
            if(PlayerInfo[PlayerB][Groove] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua org");
            PlayerInfo[PlayerB][Groove] = level;
            format(string, sizeof(string), "Vocк foi promovido a level %d por %s", level, promovedor););
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        else if(PlayerInfo[playerid][Ballas] >= 6)
        {
            if(PlayerInfo[PlayerB][Ballas] < 1) return SendClientMessage(playerid, Branco, "Este jogador nгo й da sua org");
            PlayerInfo[PlayerB][Ballas] = level;
            format(string, sizeof(string), "Vocк foi promovido a level %d por %s", level, promovedor););
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        return 1;
    }
    return 0;
}
Desta vez peguei manual do Josma:
https://sampforum.blast.hk/showthread.php?tid=270889

O manual ta muito bom, bem simples e tals, mas acredito que esses erros sejam por conta de fala ta de
pawn Код:
new
ou
#define
Ajudem ae :/
Reply


Messages In This Thread
[AJUDA] Dando uns erros aqui :/ - by GustavoBonomo - 25.11.2011, 15:07
Re: [AJUDA] Dando uns erros aqui :/ - by Pharrel - 25.11.2011, 15:11
Re: [AJUDA] Dando uns erros aqui :/ - by GustavoBonomo - 25.11.2011, 15:14
Re: [AJUDA] Dando uns erros aqui :/ - by Pharrel - 25.11.2011, 15:17
Re: [AJUDA] Dando uns erros aqui :/ - by rjjj - 25.11.2011, 15:18
Re: [AJUDA] Dando uns erros aqui :/ - by GustavoBonomo - 25.11.2011, 15:20
Re: [AJUDA] Dando uns erros aqui :/ - by Pharrel - 25.11.2011, 15:23
Re: [AJUDA] Dando uns erros aqui :/ - by GustavoBonomo - 25.11.2011, 19:14
Re: [AJUDA] Dando uns erros aqui :/ - by GustavoBonomo - 25.11.2011, 19:21
Re: [AJUDA] Dando uns erros aqui :/ - by |_MeGaTroN_| - 25.11.2011, 19:31

Forum Jump:


Users browsing this thread: 4 Guest(s)