View Single Post
Old 11-29-2019, 09:23 AM   #616
Human being with feelings
Lokasenna's Avatar
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,533

Try this:
optarray = table.pack("PRESETS...","Save","Delete",">Load", table.unpack(preset_list)),
table.unpack dumps the contents of a table out as multiple return values, and table.pack takes all of its arguments and puts them into a new table.

By unpacking a table in a function call, all of the table elements are passed as separate function arguments.
Lokasenna is offline   Reply With Quote