Hi,
i would like to begin to use external module but that don’t work.
I would like to have a module with the variable and another with the function.
I have this example below, could you tell me where is my error ?
Thanks
---char.lua module(..., package.seeall) local Character={} Character.var=100 return Character --exmodule.lua local Character = require ("char") module(..., package.seeall) function testFunction1() print(Character.var) end --main.lua local exmod= require ("exmodule") local Character = require ("char") exmod.testFunction1() \>\>\>terminal attempt to index global Character a nil value