Hello. As the title says most of it, is there any way to convert enum elements to a certain string? I did search a lot before coming to ask here, even in other Pawn forums. In fact I've been hassling with this for more than 4 straight hours. Unfortunately I couldn't find anything helpful at all. After some time of researching I thought a pre-processor functionality from C (which I suppose is missing in Pawn) called "stringification" would help me, but that was something completely distinct and I realized it much later.
If you don't understand, here's what I mean:
Code:
enum MyEnumThingy // <- don't get confused by this name please, it's a totally random thing (example)
{
Red,
Blue
};
// ...
new szEnumName[] = ENUM_NAME(Red /* Element value */, MyEnumThingy /* Enumerator */);
// szEnumName = "Red"
That's not something natives can do so I'm counting on a hackish macro-function, if even possible...