Closed BestestHD closed 1 year ago
I still need to look into this more but here is what I know. The unkown lua type 8 is the type LUA_TTHREAD. Which means its trying to pull the thread its self from the stack. I think the issue is since these variable only exists on the thread and not on the lua state. We may have to add a pull variant method for thread specifically.
So the issue here as stated is lua threads have no push/pull variant methods of their own. We can kill 2 birds with one stone here. The main lua.cpp is absurdly huge. I think we extrapolate most of the lua specific code into a handler class. Then both lua and luaThread can use that.
Okay I came across some incorrect information before but I now know the issue. I have used incorrect indexing throughout the codebase as it is, I use a mix of relative and static indexing. using 1 instead -1. 1 gets the bottom of the lua_stack (I was under the impression it got the top). -1 will get the top of the stack which is equal to lua_gettop().
Should be resolved with 8bedbda38436848d7154ef20106c23635b4145bc
(built from godot commit ae5668f)
pull_variant is always LuaError with error type 2 (generic runtime?)
here's my test code (sorry it's a little messy from me trying different things )
and the console output...
trying to save to a resource (my purpose here) nets this
if that helps. maybe something with godot broke it recently?