• unpack()
    4 replies, posted
Hi, I would like to know if its possible to unpack a table of tables. Eg: table1 = {{"hello", "test"}, {"hello2", "test2"}} I have tried unpack(unpack(table1)) but get an error: https://files.facepunch.com/forum/upload/111841/282e6215-7bf9-46a7-baa4-84f5cd97733c/image.png
The first unpack call is passing 2 tables to the second.
Is it possible to unpack the other 2 tables without using a for loop? I am passing the values into a function and they need to be added together not individually
Can you give an example of what you expect the function call to look like once everything is unpacked the way you want?
Nvm, I just solved it another way. I need to append one nested table to a another table. instead of inserting the tables to the other table i just inserted the values of the nest to the table. If that makes any sense. maintable = {{"one", "two"}, {"three", "four"}} for loop to cycle through maintable[1] table.insert cachetable value of loop.... etc
Sorry, you need to Log In to post a reply to this thread.