25.08.2018, 09:24
Hello guys,
Is there any way to get the optional parameters from a macro like in C++, with __VA_ARGS__?
To have this:
Example:
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
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)
Код:
ShowPlayerDialog(playerid, DIALOG, DIALOG_STYLE_LIST, Func1("HEADER"), Func1("WELCOME_MSG", GetName(playerid)), Func1("Go"), Func1("Quit"));
Thanks,
Michael