Closed RadiantUwU closed 11 months ago
I'll try to fix it later myself
This is because Lua Courtines all share the state of the parent LuaAPI object. Being able to call specific methods or pull variables from the coroutine is a convenience feature, but will have no difference from pulling it from the parent state.
This is because Lua Courtines all share the state of the parent LuaAPI object. Being able to call specific methods or pull variables from the coroutine is a convenience feature, but will have no difference from pulling it from the parent state.
I still kinda see it as an issue which is why i want to fix it
I still kinda see it as an issue which is why i want to fix it
Well, good luck. This is just how lua was designed. Coroutines are not a full lua state. They are a process within the state and can access it.
Describe the bug The bug is from where the function is being called.
The function first is grabbed, checked, a reference is then made, returning a callable to
LuaAPI
and the func ref. Now if you pause here, you will notice that even if a LuaCoroutine or the main LuaAPI gets the reference, it will always reference the main LuaAPI and never the other.To Reproduce Steps to reproduce the behavior:
Result:
Expected behavior Result expected:
Environment (please complete the following information):
Additional context N/A