Before I start, I'll say I am a beginner at Lua, so may not know all the correct terms, but I'll do my best to explain what I'm after.
I have a table (data) that contains other tables.
When data is first created, it can have any number of tables inside it (I expect this to be between 1 and 50).
I want to assign each table to it's own variable.
If I know how many tables there are then this is easy using table1 = data[1]; table2 = data[2] and so on.
I've done a count on the data so that I know the number of entries there are so what I want to do is automatically create the variables, give them a name and assign the corresponding table to it.
So lets say data contains 10 tables. I then want variables created called table1, table2, table3 and so on. table1 should be data[1], table2 should be data[2] and so on.
I'm certain I should create a loop and every time round, have a count=count+1 to create the number attached to the variable.
The problem I have is that I have no idea how to create a variable called 'table'+count (table1).
How do I join the 2 together?