Macro help ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Macro help ! (
/showthread.php?tid=189571)
Macro help ! -
[H]265 - 12.11.2010
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?
Re: Macro help ! -
TheXIII - 12.11.2010
SCM params are as following = playerid, color, text.
Re: Macro help ! -
[H]265 - 12.11.2010
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 !