Macro help !
#1

pawn Код:
#define SCM(%0,%1,%2) SendClientMessage(%2,%1,%0)
#define BOJA 0x00FF14FF

#define formatEx(%0,%1,%2) \
    do \
    { \
         new \
         string[128]; \
         format(string, sizeof string, %1, %2); \
         SCM(string, BOJA, %0); \
    } \
   while(false)
And when i use that, like in this:

pawn Код:
public OnPlayerSpawn(playerid)
{
     new
     name[24];
     GetPlayerName(playerid, name , 24);
     formatEx(playerid, "|- Your name is: %s -|",name);
}
i get this warn:

Код:
C:\Users\ExtremePower\Desktop\Lve\gamemodes\Untitled.pwn(65) : warning 205: redundant code: constant expression is zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
On this line: formatEx(playerid, "|- Your name is: %s -|",name);

can someone help me to fix this?
Reply
#2

SCM params are as following = playerid, color, text.
Reply
#3

Its not problem in that because i make this macro

pawn Код:
#define SCM(%0,%1,%2) SendClientMessage(%2,%1,%0)
And now is

SCM(text, color, playerid);

EDIT:

****** you dont know how imberresing i am right now -.- THANKS !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)