10.05.2013, 18:48
Take a look at the following piece of code:
The result I expect is creation of a function named "DIALOG_2". Instead, it creates a function "DIALOG_d_def".
How do I make a macro to parse the given parameter as an enum index, not just a string?
pawn Code:
#define dialog:%0(%1,%2,%3,%4) \
forward DIALOG_%0(%1, %2, %3, %4); \
public DIALOG_%0(%1, %2, %3, %4)
enum e_dialog_ids
{
d_abc = 1,
d_def,
d_ghi,
// ...
};
dialog:d_def(playerid, response, listitem, inputtext[])
{
// ...
return 1;
}
How do I make a macro to parse the given parameter as an enum index, not just a string?