Problem with define
#1

Hello. I want to define string for showing message to all players.

Код:
#define KAC_MONEY_MSG "money cheater"
#define KAC_KICK_MSG(%0,%1) "[SERVER] %0 has been kicked from server (%1)."

stock FormatMessage(&playerid, type, bool:ban)
{
	new string[128];
	switch(type)
	{
	    case 0:
	    {
			if(!ban) format(string, 128, ""KAC_KICK_MSG(playerid, KAC_MONEY_MSG)"");
			else format(string, 128, ""KAC_BAN_MSG(playerid, KAC_MONEY_MSG)"");
	 	}
 	}
 	return string;
}
%0 = player id, %1 = reason (string).

And im trying to send it:
Код:
SendClientMessageToAll(KAC_BAN_MSG_COLOR, FormatMessage(playerid, 0, false));
And result: [SERVER] has been kicked from server ().

What's the problem?
Reply


Messages In This Thread
Problem with define - by KuHS - 08.07.2010, 09:01
Re: Problem with define - by Hiddos - 08.07.2010, 10:01
Re: Problem with define - by KuHS - 08.07.2010, 10:13

Forum Jump:


Users browsing this thread: 2 Guest(s)