lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Apr 30, 2014 at 10:32 AM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
> Depending on the type of system, it requires that a filesystem is present and you need to point the LUA_PATH environment variables to your USB location.

Let me quickly describe a simpler method:

-- file_y.lua
function func_y() .... end

-- file_x.lua
function func_x()
    func_y()
end

I assume this is the situation, and that you then call func_x directly
from C as a global.

If you loaded *all* the Lua files on the stick, in *any* order, before
calling your entry point, then func_y and func_y are defined globally,
and so func_x works without any other work needed.