Call function within function in external module

-- externalModule.lua local m = {} m.functionOuter = function () local function functionInner () end end return m

How would I return functionInner to be part of m? Then how would I go about calling functionInner() in main.lua after requiring the module?

Thanks! :slight_smile:

Hey poogooflupduck,

what do you want to achieve with that?

Do you want to generate the inner function manually every time the outer one is called?

If yes, just return the inner function.

local m = {} m.functionOuter = function () local function functionInner () end return functionInner end return m

If thats not the case, please decribe further what you want.

Greetings

Torben

Hey poogooflupduck,

what do you want to achieve with that?

Do you want to generate the inner function manually every time the outer one is called?

If yes, just return the inner function.

local m = {} m.functionOuter = function () local function functionInner () end return functionInner end return m

If thats not the case, please decribe further what you want.

Greetings

Torben