Kitteh6660

Nested tables lesson in Lua

Aug 20th, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.22 KB | None | 0 0
  1. --Nested tables lesson
  2. local table1 = {1, 4, 7}
  3. local table2 = {2, 5, 8}
  4. local table3 = {3, 6, 9}
  5.  
  6. local tables = {table1, table2, table3} --Register tables ALWAYS AFTER you put the tables.
  7.  
  8. print(tables[2][3]) --Outputs 8
Advertisement
Add Comment
Please, Sign In to add comment