I know I’m not exactly a newbie, but I’m having a complete brainfart of a day and this is pretty much a newbie question…
I’m passing a value to a function, but I want it to return three values based on the calculations it does. I’ve done this before with no problems, but I can’t for the life of me find where I did it.
As an example…
function colour (num) local r = (math.cos(num)+1)/2 local g = (math.cos(num \* 2 + 0.1)+1)/2 local b = (math.cos(num \* 0.5 + 0.11)+1)/2 return (r,g,b) end local foo = os.time() colour(foo) object:setFillColor(r,g,b) -- I want to use the values returned from the function.
Any help at all would be appreciated.