I need help with the following code.
What I get is that the function is executed repeatedly LOGIC. That is, the first achievement run, however, if I want to run it, how I do it?
[lua]local function combA ()
print(“combA)
end
local function combB ()
print (“combB”)
end
local function combC ()
print (“combC”)
end
local function logic ()
combinacion = math.random (2)
print(“combinacion”)
print(combinacion)
if combinacion == 1 then
timer.performWithDelay(1,combA, 1)
elseif combinacion == 2 then
timer.performWithDelay(1,combB, 1)
elseif combinacion == 3 then
timer.performWithDelay(1,combC, 1)
end
end
logic()[/lua] [import]uid: 98258 topic_id: 34244 reply_id: 334244[/import]