#Interstellar

1 messages · Page 1 of 1 (latest)

elfin inlet
#

what's the point of debug.global() is there ever a time where _G isn't the "true" global table?

spare cradle
elfin inlet
#

ah yeah in a specific env

full fable
#

This is epic

stiff sonnet
ebon frigate
#

thx to srlion I've recently added a way to transfer functions with their upvalues cross-states, so... yea.
have fun with that now...

#

*just keep in mind transfering c-functions like player.GetAll may break, I noticed some state specific stuff in there for some reason.

limber root
#

as threads are way more fun when you have ffi

ebon frigate
topaz shore
#

sick

ebon frigate
#

@limber root do you know why all of gmod's functions for some reason, has this annoying call right before them, which makes them state-specific...

#

I am struggling to understand why its there and what purpose its for

ebon frigate
limber root
#

i have no idea why that would crash though

#

yeah, seems to be just that, i dont think it should crash, cause the functions just... Set L in LuaBase to whatever they just received

#

im not sure though why they would do that in the first place

#

unless it receives the wrong LuaState it should be good

ebon frigate
#

weird, its always the gmod funcs that crash however...

ebon frigate
#

L->luabase...?

limber root
#

yeah, its part of the lua state struct in gmod

ebon frigate
#

well I think thats the problem 😂

limber root
#

you didnt think it through did ya

#

xd

ebon frigate
#

fresh lua_State structs have that as nothing

#

what I have now works just have to supply that with something valid

#

other than that I am just ironing out bugs, works fine, lots of mutexes tho

limber root
#

god is that how addresses now look on x64?

#

the bitmask shit again lol

#

dont tell rubat we dont have the high 17 bits set in gcobj addresses

ebon frigate
ebon frigate
ebon frigate
#

@limber root looks like you really can't call gmod's lua functions across threads without running into race conditions from CLuaInterface.
Only way is to create our own CLuaInterface which... is ultra geh.

limber root
#

dont do that

ebon frigate
#

welp looks like we aren't getting gmod funcs cross state then

#

even if you make your own lua interface it still breaks due to some other setup missing

#

you get funny errors like this:

[string "test"]:2: bad argument #1 to 'test' (table expected, got table)
stack traceback:
        [C]: in function 'test'
        [string "test"]:2: in function <[string "test"]:1>
        [C]: at 0x80880ab2fef819ba