• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community


  1. Unitscan

    Print table at specific table depth

    I have this table stuff = { fruit = { yellow = { "Banana" }, red = { "Apple" } }, city = { "Toronto" }, name = { "Claudia" } } function scope(tbl,depth) for k, v in...
  2. A

    Lua ignoring float type

    Hello, I´m calling a function in lua to get some data via ubus. I need to show this info in a web. The table this method returns is the following. The problem is lua is just getting some of the data, not all. I can´t get the float values. When I iterate the table c_r, c_s, c_t and soc don´t...
  3. H

    Is there a way to reffer a table itself inside the same table?

    I searched and I didn't find anything, what I ask if I can do something like this, just to put an example: t={ val=3 ,EditVal=function() t.val=4 end } print(t.val) --Should print 3 t.EditVal() print(t.val) --Should print 4
  4. H

    Previous value in table

    As well as exists the function "next" to get the next value in a table, is there an equivalent to the previous value if I set the index?