In my game that uses Gideros Studio, I have a function that has multiple parameters. I want to call my function on one parameter, and then later on another. Is this possible?
Here is my function:
local function wiggleroom(a,b,c)
for i = 1,50 do
if a > b then
a = a - 1
elseif a < b then
a = a + 1
elseif a == b then
c = "correct"
end
return c
end
end
I want a
to be compared with b
, but call the function on b
and c
later on. For example:
variable = (wiggleroom(variable, b, c) --if variable was defined earlier
variable2 = (wiggleroom(a, variable2, c)
variable3 = (wiggleroom(a, b, variable3)
I also want to be able to use this function for multiple objects (call each parameter twice).