Have warning
#1

warning 202: number of arguments does not match definition

Код:
#define SSM(%0,%1) \
	SendClientMessage(%0, COLOR_SERVER, "[SERVER]:{FFFFFF} "%1)
Код:
new name[MAX_PLAYERS];
				GetPlayerName(playerid, name, sizeof(name));
				SSM(playerid, "Chao Mung Ban Tro Lai {FFFF00}%s", name); // error line
Reply
#2

The fact that you created a macro doesn't change anything about the fact that you still need to format() said message.
Reply
#3

Download YSI includes (by pressing the Download button)
Then you need to put it in pawno/includes.
Then you need to include y_va.inc like:
Код:
//after a_samp
#include <[PATH_TO_Y_VA(from YSI folder)]/y_va> //Remember to change the thing that is underlined
And now declare a function like:
Код:
SSM(playerid,color,fmat[],va_args<>)
{
    new msg[100];
    va_format(msg,sizeof(msg),fmat,va_start<3>); // 3 represents the number of arguments before va_args
    return SendClientMessage(playerid,color,msg);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)