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

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

lol

just use

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

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...
Reply
#4

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/
Reply
#5

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.
Reply
#6

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
Reply
#7

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);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)