Annoying bug with #define
#1

Hi,

There is a bug in #define, or it's a limitation, and i'm desperately searching for a workaround but i believe there isn't..

EXEMPLE:
pawn Код:
#include a_samp

#define PRINT(%1) print(#%1)

public OnFilterScriptInit()
{
  PRINT("blabla"); //work, prints "blabla"
  PRINT(blabla);  //work, prints "blabla"
  PRINT(bla[3]);  //work, prints "bla[3]"
  PRINT("bla(3)"); //work, prints "bla(3)"
  PRINT(bla(3));  //don't work, weird errors when compiling
}
So this bug appear when using parenthesis in a "fake string", which is a bit annoying for what i need to do.

Any idea?
Reply


Messages In This Thread
Annoying bug with #define - by yom - 11.11.2009, 19:06
Re: Annoying bug with #define - by MadeMan - 11.11.2009, 19:23
Re: Annoying bug with #define - by yom - 11.11.2009, 19:31
Re: Annoying bug with #define - by Daren_Jacobson - 11.11.2009, 20:22
Re: Annoying bug with #define - by yom - 11.11.2009, 20:39
Re: Annoying bug with #define - by Daren_Jacobson - 11.11.2009, 20:47
Re: Annoying bug with #define - by yom - 11.11.2009, 21:06
Re: Annoying bug with #define - by yom - 12.11.2009, 11:46

Forum Jump:


Users browsing this thread: 3 Guest(s)