Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

are there macros in roblox/lua similar to C?

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?

3 comments

0

Luau does not support preprocessor statements. What do you mean by "slight variation"?

0

I'm sure you can just execute the functions as they are.

0

answered

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.