as the title suggests im looking for a way to call multiple functions with similar names that have slight variation between them, in C i would use macros to utilize that. so i was wondering is there a way to do such thing with roblox/lua?
COMMUNITY QUESTION
are there macros in roblox/lua similar to C?
1 answer
i want to create a gui for each type of resource, ores have a gui of their own, bars have their own and so on, so by getting the type of resource i want to call a function called for example, oreGuiCreator, and if i get a bar i call barGuiCreator. with C i could do such thing with macros, in lua i dont know
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Luau does not support preprocessor statements. What do you mean by "slight variation"?
I'm sure you can just execute the functions as they are.
answered