Not sure if bugs is the right place to put this...
Is it possible to retrieve a variable within a table within a table within a table and so on?
tables = { table = { a = {x=0,y=0} b = {x=64,y=94} c = {x=0,y=0} } } print(tables.table[2][2],0,0,1) -- this is not how it works |
If I wanted to print "b.x" and "c.y" at the same time in the most conventional way possible, how would I go about that?
P#100873 2021-11-27 04:17
1
you are mixing indexed notation with named notation.
see: http://lua-users.org/wiki/TablesTutorial
(TL;DR: tables.table.a.x is the answer)
P#100886 2021-11-27 07:52
[Please log in to post a comment]