SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 05/02/2016, 01:38 PM   #1
Marquito
Big Clucker
 
Marquito's Avatar
 
Join Date: Jun 2014
Location: SA-MP
Posts: 69
Reputation: 0
Post Probleminha no SendClientMessageToAll (Aviso)

Code:
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:

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

Code:
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
__________________
Novato em Linguagem Pawn
Marquito is offline   Reply With Quote
Old 05/02/2016, 02:23 PM   #2
Monotox
Gangsta
 
Monotox's Avatar
 
Join Date: Mar 2015
Location: São Paulo - SP
Posts: 520
Reputation: 37
Default Re: Probleminha no SendClientMessageToAll (Aviso)

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

Code:
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;
}
__________________
Do you know the IPFS project?
Monotox is offline   Reply With Quote
Old 05/02/2016, 02:26 PM   #3
hlgamesbr
Big Clucker
 
hlgamesbr's Avatar
 
Join Date: Feb 2015
Location: 1 + 3 = 13, Mizeraví
Posts: 79
Reputation: 0
Default Re: Probleminha no SendClientMessageToAll (Aviso)

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

PHP Code:
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;

__________________
hlgamesbr is offline   Reply With Quote
Old 05/02/2016, 02:29 PM   #4
Marquito
Big Clucker
 
Marquito's Avatar
 
Join Date: Jun 2014
Location: SA-MP
Posts: 69
Reputation: 0
Default Re: Probleminha no SendClientMessageToAll (Aviso)

Consequi compilar! Muito obrigado +rep
__________________
Novato em Linguagem Pawn
Marquito is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] probleminha Maltz Português/Portuguese 9 30/12/2013 03:52 PM
[Ajuda] Probleminha. BieeelEvolution Português/Portuguese 8 20/10/2013 11:45 PM
[Ajuda] Probleminha Fabricio Silva Português/Portuguese 17 22/12/2012 11:17 AM


All times are GMT. The time now is 07:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.