help me for message
#1

PHP код:
SendClientMessage(playeridCOLOR_BLUE"Come in %s."robberyPlace(playerid)); 
warning 202: number of arguments does not match definition
Reply
#2

pawn Код:
new string[128];
format(string, sizeof(string), "Come in %s.", robberyPlace(playerid));
SendClientMessage(playerid, COLOR_BLUE, string);
Reply
#3

Quote:
Originally Posted by Cr3dO
Посмотреть сообщение
PHP код:
SendClientMessage(playeridCOLOR_BLUE"Come in %s."robberyPlace(playerid)); 
warning 202: number of arguments does not match definition
The code above should work.
I just want to tell you that you should never use a specifier inside a SendClientMessage, it will simply crash your server when the message is being showed. Use format to add specifiers in a SendClientMessage just like in the code above this post.

More about this on the wiki:
https://sampwiki.blast.hk/wiki/Format
Reply
#4

fixed
Reply
#5

Or you can use this to speed it up :
pawn Код:
new FALAE = false;
#define SendFormattedMessage(%0,%1,%2) do{new _str[128]; format(_str,128,%2); SendClientMessageEx(%0,%1,_str);}while(FALAE)
So you'd do :
pawn Код:
SendFormattedMessage(playerid, COLOR_BLUE, "Come in %s.", robberyPlace(playerid));
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)