On 30 April 2014 10:32, 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.
According to your example, below the module (in file_y) and program (in file_x)
file_y.lua
==========
local M = {} -- define module table
M.func_y = function() -- define function inside module table
print("func_y was called")
end
return M -- return module table
file_x.lua
==========
local file_y = require("file_y") -- load your module
local func_x = function()
file_y.func_y() -- call the function in the other module
print("func_x was called")
end
-- here is where your program starts
func_x() -- call func_x