Macros help
#1

Hello guys,
Is there any way to get the optional parameters from a macro like in C++, with __VA_ARGS__?

To have this:
Код:

#define Func1(...) \
    Func2(<Some constant like in C++ __VA_ARGS__ here>, 0)
Example:
Код:
ShowPlayerDialog(playerid, DIALOG, DIALOG_STYLE_LIST, Func1("HEADER"), Func1("WELCOME_MSG", GetName(playerid)), Func1("Go"), Func1("Quit"));
The intention here is that when the macro is called the 'Func2' will always have at least 2 arguments. Is there any way to do this in pawn?

Thanks,
Michael
Reply


Messages In This Thread
Macros help - by bgedition - 25.08.2018, 09:24
Re: Macros help - by bgedition - 25.08.2018, 10:30
Re: Macros help - by bgedition - 25.08.2018, 17:30
Re: Macros help - by bgedition - 25.08.2018, 23:06

Forum Jump:


Users browsing this thread: 2 Guest(s)