Macro doesn't parse enum indexes - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Macro doesn't parse enum indexes (
/showthread.php?tid=436262)
Macro doesn't parse enum indexes -
Pooh7 - 10.05.2013
Take a look at the following piece of code:
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;
}
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?
Re: Macro doesn't parse enum indexes -
Pooh7 - 11.05.2013
bump