How could I use a table/array to keep a list of two related items. Then pass those two items to function.
Example:
function dostuff(a, b)
doA(a)
doB(b)
end
Is it possible to keep a bunch of "a and b"s in an array then use table.remove and send those two elements to the dostuff function? I also need to add new items as well with table.insert. Once the list is empty I repopulate it again.
I suppose I need to make two tables instead? I think I confused myself trying to figure out the best way to do this.
Example:
function dostuff(a, b)
doA(a)
doB(b)
end
Is it possible to keep a bunch of "a and b"s in an array then use table.remove and send those two elements to the dostuff function? I also need to add new items as well with table.insert. Once the list is empty I repopulate it again.
I suppose I need to make two tables instead? I think I confused myself trying to figure out the best way to do this.