My question is how (or if) you can insert two values into a lua table.
I got a function that returns (a variable number of values)
function a(x, y)
return x, y
end
and another function that inserts that points into a table,
function b(x, y)
table.insert(myTable, x, y)
end
So how can i make, that i can call function b with a variable number of arguments and insert them all into my table?
binserts the valueyat positionx. Is that your intent? If you want to insert multiple values into a table, you have to calltable.insertmultiple times. This page describes how to handle a variable number of arguments to a function; does that help?