lua - Dynamically assigned table variables? -


Write a function in Lua, which creates two tables I want to assign tables with the value name with an X Go, and with a y pair. For example, if there was a line named, it would make two table lines and linear, but how can I understand how to do it. The following clearly does not work (and only for display purposes), but how would I go about doing this?

  Function Mailline (X, Y, Minorand, MaxRand, Name, Length) Name ..x = {} name..y = {}  

Later I hope to reach "linex" and "liney" when values ​​are written.

If you want them in the global namespace, you

  _g [name .. 'x] will use'] = {} _g [name. 'Y'] = {}  

For a module, you must use _m will replace instead of _G .


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -