I have this lua script:
local set = {}
set.name = "DebugMenu"
set.setName = "DebugMenu"
set.descriptionFilenameOverride = ""
set.logicalName = "<DebugMenu>"
In java I have:
LuaValue script = globals.load(..input stream.., "main", "t", globals);
How do I access the values in the table in the lua script?
You could rename it
local_set
instead, just so there's no confusion with the half-a-dozen or so otherset
functions (sethook, setmetatable...) that reside in _G. Then drop thatlocal
, so you can access contents from global scope.https://pgl.yoyo.org/luai/i/debug.getlocal The possibility exists, but it's wonky. https://www.lua.org/pil/23.1.1.html You'd have to scroll through keys 'till you find it.
Edit:
Seems easier just to rename it, so it's safely accessible from within your globals.