SA-MP Forums Archive
[Ajuda] Quando Executo este comando o servidor Fecha! e da Warning no PWN - 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] Quando Executo este comando o servidor Fecha! e da Warning no PWN (/showthread.php?tid=413007)



Quando Executo este comando o servidor Fecha! e da Warning no PWN - JokerHurley - 03.02.2013

pawn Код:
stock PlayerName(playerid)
            {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
return pname;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
        if(!strcmp(cmdtext, "/PegarEagle", true))
        {
        SendClientMessage(playerid,0xFFB400FF,"Algum Player Pegou Uma Eagle.");
        SendClientMessageToAll(0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));
        GivePlayerWeapon(playerid, 24, 999); //SEta a vida
        GivePlayerWeapon(playerid, 24, 999); // Seta colete
        return 1;
  }
    return 0;
}
#endif
Warnings :
pawn Код:
C:\Users\Matheus\Desktop\Brasil PlayCity\filterscripts\PEGARARMAJKFS.pwn(45) : warning 202: number of arguments does not match definition
C:\Users\Matheus\Desktop\Brasil PlayCity\filterscripts\PEGARARMAJKFS.pwn(50) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.



Re: Quando Executo este comando o servidor Fecha! - Dwayne-Pheonix - 03.02.2013

Tente retirar o #endif


Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - JokerHurley - 03.02.2013

pawn Код:
C:\Users\Matheus\Desktop\Brasil PlayCity\filterscripts\PEGARARMAJKFS.pwn(45) : warning 202: number of arguments does not match definition
C:\Users\Matheus\Desktop\Brasil PlayCity\filterscripts\PEGARARMAJKFS.pwn(50) : warning 217: loose indentation
C:\Users\Matheus\Desktop\Brasil PlayCity\filterscripts\PEGARARMAJKFS.pwn(52) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Endif RETIRADO


Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - Dwayne-Pheonix - 03.02.2013

Retire:

pawn Код:
SendClientMessageToAll(0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));
E adicione:
pawn Код:
new str_[64]; format(str_, 64, "O Player %s Pegou um Eagle!", PlayerName(playerid));
SendClientMessageToAll(0xFFB400FF, str_);
E caso haja um #if retire-o


Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - Gii - 03.02.2013

pawn Код:
SendClientMessageToAll(0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));



Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - JokerHurley - 03.02.2013

Pronto Consegui sу que esta dando loose indention mas o cmd funcionando perfeitamente!!!


Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - tonisantolia - 03.02.2013

Quote:
Originally Posted by JokerHurley
Посмотреть сообщение
Pronto Consegui sу que esta dando loose indention mas o cmd funcionando perfeitamente!!!
Abaixo das includes:
pawn Код:
#pragma tabsize 0



Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - JokerHurley - 03.02.2013

Vlw t '-'


Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - MustangGT - 11.02.2013

what ?
pawn Код:
return 1;
  }
    return 0;
}
#endif
e.. what ?
pawn Код:
SendClientMessageToAll(0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid))
tenta assim:
pawn Код:
if(strcmp(cmdtext, "/PegarEagle", true) == 0)
    {
        SendClientMessage(playerid,0xFFB400FF,"Algum Player Pegou Uma Eagle.");
        SendClientMessageToAll(playerid, 0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));
        GivePlayerWeapon(playerid, 24, 999); //SEta a vida
        GivePlayerWeapon(playerid, 24, 999); // Seta colete
        return 1;
  }



Re: Quando Executo este comando o servidor Fecha! e da Warning no PWN - XStylerX - 11.02.2013

Quote:
Originally Posted by MustangGT
Посмотреть сообщение
what ?
pawn Код:
SendClientMessageToAll(playerid, 0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));
wtf
pawn Код:
SendClientMessageToAll(0xFFB400FF," O Player %s Pegou um Eagle!", PlayerName(playerid));