ceifa / wasmoon

A real lua 5.4 VM with JS bindings made with webassembly
MIT License
474 stars 29 forks source link

get access to global lua variable #10

Closed hansdpf closed 3 years ago

hansdpf commented 3 years ago

Hello,

in my angular project I need access to a global lua variable from typescript. I tried several things, like: lua = luaEngine.createEngine(); myVar= lua.module.lua_getglobal (lua.global.address,'myGlobalVariable');

but had no success. What is the best way?

Thanks

ceifa commented 3 years ago

Based on readme:

lua.global.get('myGlobalVariable')