local function Holder()
local function Test1()
if Check == false then Test2() end
end
local function Test2()
if Check == false then Test1() end
end
end
This functions are inside a function, and they should call eachother, if check fails. But Test1 don’t sees Test2. Can I fix this?
local function Holder()
local Test2;
local function Test1()
if Check == false then Test2() end
end
function Test2()
if Check == false then Test1() end
end
end
Or the equivalent and maybe clearer what’s happening:
local function Holder()
local Test2 = nil
local function Test1()
if Check == false then Test2() end
end
Test2 = function()
if Check == false then Test1() end
end
end