Variable Name to String

Not tostring, I want to literally get the name of a variable, as a string. That’s it. I looked it up and didn’t find a way.

You’re doing something wrong if you need this, but it is sometimes possible via debug.getlocals and debug.getupvalues.

Remember that thread “use a local arg instead of looking an actual value”? Well… turns out ex[mfunc] doesn’t work but ex[“mfunc”] (not literally “mfunc” but the string version of the argument) does. That’s why I need this.

It doesn’t mean you’re not doing something wrong. Show your actual code, if you want.