[DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Alisson Silva Alves - 22.12.2012
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.
Respuesta: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Pedro Pawno - 22.12.2012
Coloque return 1;
no primeiro cуdigo ao invйs de return 0;.
que erro tosco em.
Re: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Alisson Silva Alves - 22.12.2012
VAI FICAR 2 RETURN 1 ?
Respuesta: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Pedro Pawno - 22.12.2012
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;
}
Re: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Don_Speed - 22.12.2012
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;
}
Re: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Alisson Silva Alves - 22.12.2012
NAO MUDO EM NADA TA A MESMA COISA
Re: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
gabrielloko157 - 22.12.2012
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
Respuesta: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Pedro Pawno - 22.12.2012
Vei posta o gm aqui.
Cara, onde tem o return 0 no primeiro cуdigo vocк tira e so deixa o return 1 ¬¬'
Re: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Alisson Silva Alves - 22.12.2012
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.
Respuesta: [DUVIDA] O QUE ESTA ERRADO NESSE CMD ? -
Pedro Pawno - 22.12.2012
no inicio do gm:
#pragma tabsize 0
ou ajeite as linhas.