[AJUDA] erro
#1

Iae galera, estou criando meu gm de Drift do 0 comeзeu hontem e hoje comeзei a criar os CMD.

Tipo quando eu copilo da Erro na Declaraзгo mais ja tentei de tudo pra arrumar e nгo consegui

se alguem que saiba o erro me de uma ajuda por favor ? Apenas me diz oque fazer ^^

Nome do erro :

pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(160) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(164) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(167) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(171) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Linhas :

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

//Comando da linha 160
  if(strcmp(cmdtext, "/grana", true) == 0){
        {
        SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
        GivePlayerMoney(playerid, 100000);
/*Erro 164*/        return 1;
        }
    }

/*Erro 167*/  if(strcmp(cmdtext, "/pd", true)==0)
        {
        SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
        Anunciar(playerid,"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)");
/*erro 171*/        return 1;
        }
    }
OBS : Estou criando os Comando como ponde ver ainda nгo tem a funзгo '-' apenas 1 com a funзгo

Se poderem me ajudar eu agradeзo ^^

ATT : Oakley
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/grana", true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
    GivePlayerMoney(playerid, 100000);
    return 1;
}
if(strcmp(cmdtext, "/pd", true)==0)
{
    SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
    new str[120],nome[MAX_PLAYER_NAME];GetPlayerName(playerid,nome,sizeof(nome));
    format(str,sizeof(str),"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)",nome);
    SendClientMessageToAll(-1,str);
    return 1;
}
Reply
#3

@Willian_Luigi
Continua os mesmo erro manolo, e tipo assim nгo queria o cmd queria a explicaзгo doque eu devo fazer se possivel ^^
Reply
#4

Qual a callback que vocк estб usando para criar os seus comandos? '-'
Reply
#5

Tipo assim GM ta do 0

Atй agora eu so coloquei as Cor e agora to criando os CMD normal '-' qeer minha onplayercommandtext ?

minha OnPlayerCommandText ta assim atй agora '-'

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/admins", true) == 0)
    {
    new Jogador[24];
    new count5;
    new msg[120];
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    GetPlayerName(i,Jogador,24);
    SendClientMessage(playerid, 0xFFFFFFAA, "(=-=-=-=-=-=( {33CCFF}Admins {33CCFF}Online )=-=-=-=-=-=)");
    format(msg,sizeof(msg),"%s", Jogador);
    SendClientMessage(playerid, 0xFFFFFFAA, msg);
    count5++;
    }
    }
    if(count5 == 0){
   SendClientMessage(playerid, 0xFFFFFFAA, "(=-=-=-=-=-=( {33CCFF}Nenhum ADM {33CCFF}Online )=-=-=-=-=-=).");
   }
   return 1;
}
    if (strcmp("/comandos", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /pd /pd2 ate o /pd10 <-- || --> /aerols /aerolv /aerosf <-- || --> /ls /lv /sf <-- .");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /Sakina /Okaru /Akagi /Ebisu <-- || --> /Derby /Derby2 <-- || --> /dia /noite <-- .");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /tunar /x /grana /creditos <-- || --> /pm /admins /tv /tvoff<-- || --> /vmenu /regras<-- .");
    SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
        return 1;
    }
    return 0;
}

if(strcmp(cmdtext, "/grana", true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
    GivePlayerMoney(playerid, 100000);
    return 1;
}
if(strcmp(cmdtext, "/pd", true)==0)
{
    SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
    new str[120],nome[MAX_PLAYER_NAME];GetPlayerName(playerid,nome,sizeof(nome));
    format(str,sizeof(str),"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)",nome);
    SendClientMessageToAll(-1,str);
    return 1;
}
Reply
#6

os dois ъltimos comandos nгo estгo dentro da callback porque vocк jб retornou ela... preste atenзгo ali emcima que vocк verб.
EXEMPLO: presta atenзгo nas chaves { } e na return
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/grana", true) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
        GivePlayerMoney(playerid, 100000);
        return 1;
    }
    if(strcmp(cmdtext, "/pd", true)==0)
    {
        SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
        new str[120],nome[MAX_PLAYER_NAME];GetPlayerName(playerid,nome,sizeof(nome));
        format(str,sizeof(str),"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)",nome);
        SendClientMessageToAll(-1,str);
        return 1;
    }
    return 0;
}
Reply
#7

aew manolo consegui brigado mais tipo to achando quee meu gm ta com macumba depois que vc me ajudo e eu arrumei deu 26 erros nas coisa q nгo teem nada aveee

tipo :

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}
Erros :
pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(633) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(633) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(638) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(638) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(638) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(643) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(643) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(643) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(648) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(648) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(648) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(653) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(653) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(653) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(658) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(658) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(658) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(663) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(663) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(663) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(668) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(668) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(668) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(673) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(673) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(673) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(678) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(678) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(678) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(683) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(683) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(683) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(688) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(688) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(688) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(693) : warning 225: unreachable code
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(693) : error 029: invalid expression, assumed zero
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(693) : error 004: function "OnVehicleMod" is not implemented

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


26 Errors.
Nгo estou entendeno mais esse gm
Reply
#8

Isso й porque vocк estб abusando das Chaves "{" "}" no seu GM
Reply
#9

Poxa nгo tem como ta abusando estou colocando do geito q vc pediu :

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/grana", true) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
        GivePlayerMoney(playerid, 100000);
        return 1;
    }
    if(strcmp(cmdtext, "/pd", true)==0)
    {
        SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
        new str[120],nome[MAX_PLAYER_NAME];GetPlayerName(playerid,nome,sizeof(nome));
        format(str,sizeof(str),"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)",nome);
        SendClientMessageToAll(-1,str);
    }
    if (strcmp("/comandos", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /pd /pd2 ate o /pd10 <-- || --> /aerols /aerolv /aerosf <-- || --> /ls /lv /sf <-- .");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /Sakina /Okaru /Akagi /Ebisu <-- || --> /Derby /Derby2 <-- || --> /dia /noite <-- .");
    SendClientMessage(playerid, 0x00C2ECFF, "--> /tunar /x /grana /creditos <-- || --> /pm /admins /tv /tvoff<-- || --> /vmenu /regras<-- .");
    SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
    }
    if  (strcmp("/dia", cmdtext, true) == 0)
    {
    SendClientMessageToAll(0xE100E1FF, "Vocк mudou o tempo para Dia!");
    SetPlayerTime(playerid, 12,0);
    }
    if (strcmp("/noite", cmdtext, true) == 0)
    {
    SendClientMessageToAll(0xE100E1FF, "Vocк mudou o tempo para Noite!");
    SetPlayerTime(playerid, 00,0);
    }
    if (strcmp("/Creditos", cmdtext, true) == 0)
    {
    SendClientMessage(playerid, 0x626262FF, "(=-=-=-=-=-=( Crйditos do GM )=-=-=-=-=-=)");
    SendClientMessage(playerid, 0x626262FF, "Scripter : SnoOpy_.");
    SendClientMessage(playerid, 0x626262FF, "Mapper : SnoOpy_.");
    SendClientMessage(playerid, 0x626262FF, "GM Todo feito por : SnoOpy_.");
    SendClientMessage(playerid, 0xE100E1FF, "(=-=-=-=-=-=( Crйditos do GM )=-=-=-=-=-=)");
    return 1;
}
Reply
#10

Compara o seu com esse aqui ... E veja a diferenзa (:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/grana", true) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, " {33CCFF}MUHAHAHA Seu emo ! Agora vocк Viro {33CCFF}RICO !");
        GivePlayerMoney(playerid, 100000);
        return 1;
    }
    if(strcmp(cmdtext, "/pd", true)==0)
    {
        SendClientMessage(playerid, 0xE100E1FF," Vocк foi para a Power Drift /pd");
        new str[120],nome[MAX_PLAYER_NAME];GetPlayerName(playerid,nome,sizeof(nome));
        format(str,sizeof(str),"(=-=-=-=-=-=( %s foi para a Power Drift ( /pd ))=-=-=-=-=-=)",nome);
        SendClientMessageToAll(-1,str);
        return 1;
    }
    if (strcmp("/comandos", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
        SendClientMessage(playerid, 0x00C2ECFF, "--> /pd /pd2 ate o /pd10 <-- || --> /aerols /aerolv /aerosf <-- || --> /ls /lv /sf <-- .");
        SendClientMessage(playerid, 0x00C2ECFF, "--> /Sakina /Okaru /Akagi /Ebisu <-- || --> /Derby /Derby2 <-- || --> /dia /noite <-- .");
        SendClientMessage(playerid, 0x00C2ECFF, "--> /tunar /x /grana /creditos <-- || --> /pm /admins /tv /tvoff<-- || --> /vmenu /regras<-- .");
        SendClientMessage(playerid, 0xE100E1FF,"(=-=-=-=-=-=( Power Drift )=-=-=-=-=-=)");
        return 1;
    }
    if  (strcmp("/dia", cmdtext, true) == 0)
    {
        SendClientMessageToAll(0xE100E1FF, "Vocк mudou o tempo para Dia!");
        SetPlayerTime(playerid, 12,0);
        return 1;
    }
    if (strcmp("/noite", cmdtext, true) == 0)
    {
        SendClientMessageToAll(0xE100E1FF, "Vocк mudou o tempo para Noite!");
        SetPlayerTime(playerid, 00,0);
        return 1;
    }
    if (strcmp("/Creditos", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, 0x626262FF, "(=-=-=-=-=-=( Crйditos do GM )=-=-=-=-=-=)");
        SendClientMessage(playerid, 0x626262FF, "Scripter : SnoOpy_.");
        SendClientMessage(playerid, 0x626262FF, "Mapper : SnoOpy_.");
        SendClientMessage(playerid, 0x626262FF, "GM Todo feito por : SnoOpy_.");
        SendClientMessage(playerid, 0xE100E1FF, "(=-=-=-=-=-=( Crйditos do GM )=-=-=-=-=-=)");
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)