[Ajuda] Probleminha no SendClientMessageToAll (Aviso)
#1

Код:
C:\Users\...\Documents\Biblioteca SA-MP\...\gamemodes\Teste1.pwn(436) : warning: 202: number of arguments does not match definition
C:\Users\...\Documents\Biblioteca SA-MP\...\gamemodes\Teste1.pwn(436) : warning: 202: number of arguments does not match definition
Linha 436:

Код:
    SendClientMessageToAll(COR_AZUL_CLARO, "%s(ID:%d) foi ate o Spawn! (/spawn)", Name, playerid);
Codigo Completo:

Код:
CMD:spawn(playerid)
{
    new Name[MAX_PLAYERS][MAX_PLAYER_NAME];
    SendClientMessageToAll(COR_AZUL_CLARO, "%s(ID:%d) foi ate o Spawn! (/spawn)", Name, playerid);
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}
Poderiam me ajudar Desde jб agradeзo
Reply
#2

Quando os argumentos excedem o permitido pela funзгo, formate-a com o Format em uma string.

Код:
CMD:spawn(playerid)
{
    new Name[MAX_PLAYERS][MAX_PLAYER_NAME];
    new string[80];
    format(string, sizeof(string), "%s(ID:%d) foi ate o Spawn! (/spawn)",Name,playerid);
    SendClientMessageToAll(COR_AZUL_CLARO, string);
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}
Reply
#3

O Monotox postou antes e eu n vi '-', mas oque vale e a intenзгo
Use format :P

PHP код:
new mensagenparatodos[128];//se quiser pode criar uma no comando!
CMD:spawn(playerid)
{
    new 
Name[MAX_PLAYER_NAME];
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
format(mensagenparatodossizeof(mensagenparatodos), "%s(ID:%d) foi ate o Spawn! (/spawn)"Nameplayeridmensagenparatodos);
    
SendClientMessageToAll(COR_AZUL_CLAROmensagenparatodos);
    return 
1;

Reply
#4

Consequi compilar! Muito obrigado +rep
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)