[Ajuda] Erro no Comando
#1

O Comando


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Pacotes", cmdtext, true, 10) == 0)
}
SendClientMessage(playerid,COR_AMARELO," Pacote 1 --> M4 + Eagle + MP5 + Sniper + Dildo " );
SendClientMessage(playerid,COR_AMARELO," Pacote 2 --> Shotgun + Knife + Granada + Camera " );
return 1;

if (strcmp("/Pacote1", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,24,999);
GivePlayerWeapon(playerid,10,10);
GivePlayerWeapon(29,999);
GivePlayerWeapon(playerid,36,999);
GivePlayerMoney(playerid,-50000);
SendClientMessage(playerid,COR_VERDE," Voce Comprou o Pacote 1 " );
return 1;
}

if (strcmp("/Pacote2", cmdtext, true, 10) == 0)
{

GivePlayerWeapon(playerid,25,999);
GivePlayerWeapon(playerid,4,999);
GivePlayerWeapon(playerid,16,999);
GivePlayerWeapon(playerid,43,999);
GivePlayerMoney(playerid,-50000);
SendClientMessage(playerid,COR_VERDE," Voce Comprou o Pacote 2 " );
return 1;
}


if (strcmp("/Kill", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COR_LARANJA," Voce se matou Otario " );
SetPlayerHealth(playerid,-100);
return 1 ;
}

if (strcmp("/Ajuda", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COR_AMARELO,"========== =================================================" );
SendClientMessage(playerid,COR_LARANJA," Utilize /Admins para Visualizar os Admins Online");
SendClientMessage(playerid,COR_LARANJA," Utilize /Comandos Para Ver os Comandos do Servidor");
SendClientMessage(playerid,COR_LARANJA," Utilize /Relato Para Tirar Duvidas com Admins Online");
SendClientMessage(playerid,COR_AMARELO,"========== =================================================" );

return 1;
}
}











O ERRRO




Quote:

C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(82) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(123) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(12 : warning 225: unreachable code
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(132) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(139) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(152) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Desktop\Nova pasta\gamemodes\GMDM.pwn(169) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Seu erro!
pawn Код:
if (strcmp("/Pacotes", cmdtext, true, 10) == 0)
}
SendClientMessage(playerid,COR_AMARELO," Pacote 1 --> M4 + Eagle + MP5 + Sniper + Dildo " );
SendClientMessage(playerid,COR_AMARELO," Pacote 2 --> Shotgun + Knife + Granada + Camera " );
return 1;
Em vez de { voce colocou } , esqueceu tmb de fechar com } depois do return .
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Pacotes", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COR_AMARELO," Pacote 1 --> M4 + Eagle + MP5 + Sniper + Dildo " );
SendClientMessage(playerid,COR_AMARELO," Pacote 2 --> Shotgun + Knife + Granada + Camera " );
return 1;
}

if (strcmp("/Pacote1", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,24,999);
GivePlayerWeapon(playerid,10,10);
GivePlayerWeapon(29,999);
GivePlayerWeapon(playerid,36,999);
GivePlayerMoney(playerid,-50000);
SendClientMessage(playerid,COR_VERDE," Voce Comprou o Pacote 1 " );
return 1;
}

if (strcmp("/Pacote2", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid,25,999);
GivePlayerWeapon(playerid,4,999);
GivePlayerWeapon(playerid,16,999);
GivePlayerWeapon(playerid,43,999);
GivePlayerMoney(playerid,-50000);
SendClientMessage(playerid,COR_VERDE," Voce Comprou o Pacote 2 " );
return 1;
}


if (strcmp("/Kill", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COR_LARANJA," Voce se matou Otario " );
SetPlayerHealth(playerid,-100);
return 1 ;
}

if (strcmp("/Ajuda", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COR_AMARELO,"========== =================================================" );
SendClientMessage(playerid,COR_LARANJA," Utilize /Admins para Visualizar os Admins Online");
SendClientMessage(playerid,COR_LARANJA," Utilize /Comandos Para Ver os Comandos do Servidor");
SendClientMessage(playerid,COR_LARANJA," Utilize /Relato Para Tirar Duvidas com Admins Online");
SendClientMessage(playerid,COR_AMARELO,"========== =================================================" );
return 1;
}
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)