Guys,
How can i call a variable like this example:
[lua]local bg1 = “anything”
bg1.myName = “test1”
local bg2 = “something”
bg2.myName = “test2”
for i = 1,2 do
–The problem starts here. How can i call the variable dynamically?
print(bg[i].myName)
end[/lua]
In my case, i tryed to create it all in a table, but my game performance was terrible. So, i started to use my code not using tables ,like the example above, and my performance was perfect. But now i have to call some variables dynamically and i can’t find how.
I searched on the web how to do that on Lua and didn’t found anything.
Anyone can help me?
[import]uid: 127998 topic_id: 25343 reply_id: 325343[/import]