Запись опубликована Виталий Алтаев. Please leave any comments there.
Simplest way to call function from loaded module is passing function name to the module: 123456789101112131415161718192021——— —main.lua ——— function myFunction() print("hello from module!") end local interface = require("interface") interface.init(myfunction) ——— — interface.lua — your module ——— module(…, package.seeall) function init(callFuncName) if(callFuncName)then callFuncName() end end