I have the following lua script:
module("modoo",package.seeall)
foo=1
bar={12,34}
Which works fine with cli, for example:
> dofile "mod_modoo.lua"
> =modoo.foo
1
> =modoo
table: 0x86ce058
As far as I understand, it works like a table, but whenever I try to load it as a table, the nil value is pushed onto the stack. Every other table is working fine.
I thought using lua_getglobal would not work with modules, but I could not find the correct way to load it; how should i do this?
source
share