Multiline define pattern
#1

Hello - this time I need help. I'm using something like:
pawn Код:
#define merge(%0,%1) \
    format(%0, sizeof(%0), %1)
Yup, I'm lazy. Anyway: it works fine for something like:
pawn Код:
new str[32];
merge(str, "%s: %s", "Pancakes are", "AWESOME");
But sometimes in my script I have something like:
pawn Код:
new str[499+1];
merge(str, "%s, %d, %s, %s, %s, %d, $%d, $%d",
UData[playerid][uname], UData[playerid][age], UData[playerid][sex], "Something", UData[playerid][strength], UData[playerid][uid], UData[playerid][cash], UData[playerid][bank_cash]);
Format accepted my multline syntax, but define didn't and I get
Quote:

error 017: undefined symbol "merge"

Can I somehow make define to respect multiline syntax too?
Reply


Messages In This Thread
Multiline define pattern - by Misiur - 01.08.2012, 12:31
Re: Multiline define pattern - by Vince - 01.08.2012, 13:14
Re: Multiline define pattern - by Misiur - 01.08.2012, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)