SA-MP Forums Archive
D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match defini - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match defini (/showthread.php?tid=621712)



D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match defini - Exlivebs - 13.11.2016

SendClientMessage(playerid,COLOR_GRAD1,"Pots: %d", PlayerInfo[playerid][pPot]);
Help me please


Re: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match de - Yaa - 13.11.2016

lol

just use

PHP код:
new string[200];
format(string200"Pots: %d"PlayerInfo[playerid][pPot]);
SendClientMessage(playerid,COLOR_GRAD1,string); 



Yaa - Sew_Sumi - 13.11.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
lol

just use

new string[200];
format(string, 200, "Pots: %d", PlayerInfo[playerid][pPot]);
SendClientMessage(playerid,COLOR_GRAD1,string);












+REP
click in police star down <--
Hell, that doesn't even need to be 200 cells. Rep begger...


Not to mention, why set the size in format, when you could simply use sizeof, without having to change the size of the string, in 2 places, rather than just the one...


Re: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match de - Yaa - 13.11.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Hell, that doesn't even need to be 200 cells. Rep begger...
Comon I'm new here :I

i need some reps for decorations \o/


Re: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match de - Sew_Sumi - 13.11.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
Comon I'm new here :I

i need some reps for decorations \o/
You need to tend to that thread... Screw your rep begging, "new" or not.


Re: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match de - Yaa - 13.11.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
You need to tend to that thread... Screw your rep begging, "new" or not.
and not need to be ---> annoying <--- there a feature called pm and don't post it in public + Don't be rude

be nice bro


Re: D:\samp servers\Grand City Roleplay\gamemodes\CG-RP1.pwn(97608) : warning 202: number of arguments does not match de - Dayrion - 13.11.2016

Hey guys.. Can you, please, chill? /:

About this
PHP код:
SendClientMessage(playerid,COLOR_GRAD1,"Pots: %d",    PlayerInfo[playerid][pPot]); 
The problem is SCM (SendClientMessage) is defined like that :
Код:
SendClientMessage(playerid, color, const message[])
You added one more parameter and this why this giving you a warning.
You can simply do that :
PHP код:
new string[10 EOS];
format(stringsizeof(string), "Pots: %d",    PlayerInfo[playerid][pPot]);
SendClientMessage(playeridCOLOR_GRAD1string); 
I think is a good to way to reach what you want.

After, you can do more "complicated" with Y_VA. Take a look:
PHP код:
SendClientMessageFormat(const playeridcolor, const message[], va_args<>)
{
    new
        
string[145];
    
va_format(stringsizeof(string), messageva_start<3>);
    return 
SendClientMessage(playeridcolorstring);