Hello! I have a question about something harder than I expected.
Showing code would be easier to understand.
So I actually have two files:
--module.lua
local oldP = print
function print(...) --Nothing to edit here
if(debug.getinfo(2).short_src == "module.lua") then
print("Bad source!")
else
print("GG, how the f did you do that?")
end
return oldP(...)
end
function sayHello()
print("Hello!") --I want the print to be called from the level 2 (main.lua), by using sayHello()
end
--main.lua
sayHello() --Same, nothing to edit here
How to call a global function from level 1 like if it was called on level 2? (No detour btw)
I guess this is kinda tricky to understand, and i don't even know if this is possible.
Maybe envs could solve that?
Thanks for reading/helping me!
Sorry, you need to Log In to post a reply to this thread.