Lua use a variable in an object reference? -


is possible use variable in object reference in lua? example, a.value string, , a.value = "b". access a.b.c.d, or a.(a.value).c.d. how can accomplish this?

the syntax a.b shorthand a["b"]. want, you'd rid of "b" , instead use variable, this:

a[a.value].c.d 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -