[DUVIDA] O QUE ESTA ERRADO NESSE CMD ?
#1

Porque esta dando os 3 erro ? e o warning
pawn Код:
//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/equipe", cmdtext, true, 10) == 0)
   {

            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            SendClientMessage(playerid, COLOR_GREEN , "[Brasil CarboN Games] Equipe");
            SendClientMessage(playerid, COLOR_GREEN , "Dono/Scripter: Kluunk_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Sub-Donos: BlooD_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Ajudante De Sub-Dono: Wesley_CarboN");
            SendClientMessage(playerid, COLOR_BLUE  , "Brasilcarbongames.forumeiros.com");
            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            return 1;
    }
    return 0;
}

            if (strcmp("/orgs", cmdtext, true, 10) == 0)
            {
            SendClientMessage(playerid,COLOR_BLUE , "Governo - 1");
            SendClientMessage(playerid,COLOR_BLUE , "Samu - 2");
            SendClientMessage(playerid,COLOR_BLUE , "Policia Militar - 3");
            SendClientMessage(playerid,COLOR_BLUE , "Policia Civil - 4");
            SendClientMessage(playerid,COLOR_BLUE , "Policia Federal - 5");
            SendClientMessage(playerid,COLOR_BLUE , "Bope - 6");
            SendClientMessage(playerid,COLOR_BLUE , "Exercito - 7");
            SendClientMessage(playerid,COLOR_BLUE , "Interpol - 8");
            SendClientMessage(playerid,COLOR_BLUE , "Los Aztecas - 9");
            SendClientMessage(playerid,COLOR_BLUE , "Los Vagos - 10");
            SendClientMessage(playerid,COLOR_BLUE , "Los Tugas - 11");
            SendClientMessage(playerid,COLOR_BLUE , "Ballas - 12");
            SendClientMessage(playerid,COLOR_BLUE , "Groove Street - 13");
            SendClientMessage(playerid,COLOR_BLUE , "Comando Vermelho - 14");
            SendClientMessage(playerid,COLOR_BLUE , "Cosa Nostra - 15");
            SendClientMessage(playerid,COLOR_BLUE , "Yakuza -16");
            SendClientMessage(playerid,COLOR_BLUE , "Sons Of Anarchy - 17");
            SendClientMessage(playerid,COLOR_BLUE , "Mayans - 18");
            SendClientMessage(playerid,COLOR_BLUE , "Taliban - 19");
            SendClientMessage(playerid,COLOR_BLUE , "Alqaeda - 20");
            SendClientMessage(playerid,COLOR_BLUE , "Hitmans - 21");
            SendClientMessage(playerid,COLOR_BLUE , "Reportes - 22");
            SendClientMessage(playerid,COLOR_BLUE , "Taxistas - 23");
            return 1;
    }
    return 0;
}
//==============================================================================



pawn Код:
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(79) : warning 217: loose indentation
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(82) : error 010: invalid function or declaration
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(107) : error 010: invalid function or declaration
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(109) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply
#2

Coloque return 1;
no primeiro cуdigo ao invйs de return 0;.
que erro tosco em.
Reply
#3

VAI FICAR 2 RETURN 1 ?
Reply
#4

Ops quer dizer, retire o return 0 e coloque o 1.

pawn Код:
if (strcmp("/equipe", cmdtext, true, 10) == 0)
   {

            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            SendClientMessage(playerid, COLOR_GREEN , "[Brasil CarboN Games] Equipe");
            SendClientMessage(playerid, COLOR_GREEN , "Dono/Scripter: Kluunk_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Sub-Donos: BlooD_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Ajudante De Sub-Dono: Wesley_CarboN");
            SendClientMessage(playerid, COLOR_BLUE  , "Brasilcarbongames.forumeiros.com");
            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            return 1;
    }
Reply
#5

Voce esta colocando 2 returns no cmd .

Como estas :
pawn Код:
if (strcmp("/equipe", cmdtext, true, 10) == 0)
   {

            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            SendClientMessage(playerid, COLOR_GREEN , "[Brasil CarboN Games] Equipe");
            SendClientMessage(playerid, COLOR_GREEN , "Dono/Scripter: Kluunk_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Sub-Donos: BlooD_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Ajudante De Sub-Dono: Wesley_CarboN");
            SendClientMessage(playerid, COLOR_BLUE  , "Brasilcarbongames.forumeiros.com");
            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            return 1;
    }
    return 0;
}
Como deve ser
pawn Код:
if (strcmp("/equipe", cmdtext, true, 10) == 0)
   {

            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            SendClientMessage(playerid, COLOR_GREEN , "[Brasil CarboN Games] Equipe");
            SendClientMessage(playerid, COLOR_GREEN , "Dono/Scripter: Kluunk_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Sub-Donos: BlooD_CarboN");
            SendClientMessage(playerid, COLOR_GREEN , "Ajudante De Sub-Dono: Wesley_CarboN");
            SendClientMessage(playerid, COLOR_BLUE  , "Brasilcarbongames.forumeiros.com");
            SendClientMessage(playerid, COLOR_BLUE  , "----------------------------------------------");
            return 1;
    }
Reply
#6

NAO MUDO EM NADA TA A MESMA COISA
Reply
#7

o warning й pq tб mal identado

os erros й por causa que ja deve ter a public ou ta colocando a public no lugar errado


pawn Код:
//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp("/equipe", cmdtext, true, 10) == 0) {
        SendClientMessage(playerid, COLOR_BLUE, "----------------------------------------------");
        SendClientMessage(playerid, COLOR_GREEN, "[Brasil CarboN Games] Equipe");
        SendClientMessage(playerid, COLOR_GREEN, "Dono/Scripter: Kluunk_CarboN");
        SendClientMessage(playerid, COLOR_GREEN, "Sub-Donos: BlooD_CarboN");
        SendClientMessage(playerid, COLOR_GREEN, "Ajudante De Sub-Dono: Wesley_CarboN");
        SendClientMessage(playerid, COLOR_BLUE, "Brasilcarbongames.forumeiros.com");
        SendClientMessage(playerid, COLOR_BLUE, "----------------------------------------------");
        return 1;
    }
    return 0;
}
if (strcmp("/orgs", cmdtext, true, 10) == 0) {
    SendClientMessage(playerid, COLOR_BLUE, "Governo - 1");
    SendClientMessage(playerid, COLOR_BLUE, "Samu - 2");
    SendClientMessage(playerid, COLOR_BLUE, "Policia Militar - 3");
    SendClientMessage(playerid, COLOR_BLUE, "Policia Civil - 4");
    SendClientMessage(playerid, COLOR_BLUE, "Policia Federal - 5");
    SendClientMessage(playerid, COLOR_BLUE, "Bope - 6");
    SendClientMessage(playerid, COLOR_BLUE, "Exercito - 7");
    SendClientMessage(playerid, COLOR_BLUE, "Interpol - 8");
    SendClientMessage(playerid, COLOR_BLUE, "Los Aztecas - 9");
    SendClientMessage(playerid, COLOR_BLUE, "Los Vagos - 10");
    SendClientMessage(playerid, COLOR_BLUE, "Los Tugas - 11");
    SendClientMessage(playerid, COLOR_BLUE, "Ballas - 12");
    SendClientMessage(playerid, COLOR_BLUE, "Groove Street - 13");
    SendClientMessage(playerid, COLOR_BLUE, "Comando Vermelho - 14");
    SendClientMessage(playerid, COLOR_BLUE, "Cosa Nostra - 15");
    SendClientMessage(playerid, COLOR_BLUE, "Yakuza -16");
    SendClientMessage(playerid, COLOR_BLUE, "Sons Of Anarchy - 17");
    SendClientMessage(playerid, COLOR_BLUE, "Mayans - 18");
    SendClientMessage(playerid, COLOR_BLUE, "Taliban - 19");
    SendClientMessage(playerid, COLOR_BLUE, "Alqaeda - 20");
    SendClientMessage(playerid, COLOR_BLUE, "Hitmans - 21");
    SendClientMessage(playerid, COLOR_BLUE, "Reportes - 22");
    SendClientMessage(playerid, COLOR_BLUE, "Taxistas - 23");
    return 1;
}
//==============================================================================

@ Edit tenta tirar 1 return do 1є cmd
Reply
#8

Vei posta o gm aqui.

Cara, onde tem o return 0 no primeiro cуdigo vocк tira e so deixa o return 1 ¬¬'
Reply
#9

vlw Don_Speed mais ainda fico 2 warning

pawn Код:
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(79) : warning 217: loose indentation
C:\Documents and Settings\Kluunk\Desktop\Serve\gamemodes\BCG.pwn(106) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#10

no inicio do gm:

#pragma tabsize 0

ou ajeite as linhas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)