o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
pawn Код:
CMD:cv(playerid, params[])
{
new Texto[200];
new String[128];
new Nome[128];
if(PlayerInfo[playerid][pAdmin] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_ERRO, ""VERMELHO"[ERRO]:Vocк Nгo Tem Permissгo Para Usar Esse Comando Apenas Admin 1+ !.");
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, -1, ""VERMELHO"[USO]:"AZUL_CLARO" /cv [Texto]");
format(String, sizeof(String), "[ADMIN]:"VERMELHO" %s Diz:"AZUL_CLARO" %s", Nome(playerid), Texto);//erro aqui
SendClientMessageToAll(-1, String);
return 1;
}
pawn Код:
: error 012: invalid function call, not a valid address
: warning 215: expression has no effect
: error 001: expected token: ";", but found ")"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
OBS: sou novato nao sei oq to fazendo de errado
Re: o QUE TO FAZENDO DE ERRADO? -
.FuneraL. - 27.09.2012
Deve ser nas defines, tente fazer isto:
pawn Код:
#define VERMELHO "{FF0000}"
#define AZUL_CLARO "{00FFFF}"
Re: o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
Quote:
Originally Posted by .FuneraL.
Deve ser nas defines, tente fazer isto:
pawn Код:
#define VERMELHO "{FF0000}" #define AZUL_CLARO "{00FFFF}"
|
Nгo Nгo As Define eu tenho suave eu uso aquelas cores quase em todos os meus code sу nesse q tб dando erro
Re: o QUE TO FAZENDO DE ERRADO? -
@Riichard - 27.09.2012
Pra que essa fulia? --'
Nгo й melhor usar: {COR} no prуprio texto? --'
Re: o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
Quote:
Originally Posted by @Riichard
Pra que essa fulia? --'
Nгo й melhor usar: {COR} no prуprio texto? --'
|
aprendi assim e assim pra min tб bom
Re: o QUE TO FAZENDO DE ERRADO? -
Kuddy - 27.09.2012
pawn Код:
"[ADMIN]:"#VERMELHO" %s Diz:"#AZUL_CLARO" %s"
Re: o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
Quote:
Originally Posted by Kuddy
pawn Код:
"[ADMIN]:"#VERMELHO" %s Diz:"#AZUL_CLARO" %s"
|
Se fosse a cor nao ia dar em nenhum comando
Re: o QUE TO FAZENDO DE ERRADO? -
@Riichard - 27.09.2012
.-.
Tente:
pawn Код:
CMD:cv(playerid, params[])
{
new Texto[200];
new String[128];
new Nome[128];
if(PlayerInfo[playerid][pAdmin] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_ERRO, ""VERMELHO"[ERRO]:Vocк Nгo Tem Permissгo Para Usar Esse Comando Apenas Admin 1+ !.");
if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, 0xFF0000AA, "[USO]:"AZUL_CLARO" /cv [Texto]");
format(String, sizeof(String), "[ADMIN]:"VERMELHO" %s Diz:"AZUL_CLARO" %s", Nome(playerid), Texto);//erro aqui
SendClientMessageToAll(-1, String);
return 1;
}
Re: o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
Quote:
Originally Posted by @Riichard
.-.
Tente:
pawn Код:
CMD:cv(playerid, params[]) { new Texto[200]; new String[128]; new Nome[128]; if(PlayerInfo[playerid][pAdmin] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_ERRO, ""VERMELHO"[ERRO]:Vocк Nгo Tem Permissгo Para Usar Esse Comando Apenas Admin 1+ !."); if(sscanf(params, "s", Texto)) return SendClientMessage(playerid, 0xFF0000AA, "[USO]:"AZUL_CLARO" /cv [Texto]"); format(String, sizeof(String), "[ADMIN]:"VERMELHO" %s Diz:"AZUL_CLARO" %s", Nome(playerid), Texto);//erro aqui SendClientMessageToAll(-1, String); return 1; }
|
deu nao eu descobri o erro mais da bug й so tirar aquele (playerid) mais acho q teria q pegar o nome dele pra min por no format nй?
Re: o QUE TO FAZENDO DE ERRADO? -
Owtsiixx_Twd - 27.09.2012
бб pq quando tiro aquele (playerid) nao aparece o nome do cara acho q tem q criar uma new pra pegar o nome?