Open ehrhart opened 10 years ago
Well, the invoke methods really should be poping the errors back off the lua stack. but I could add a globalExists or similar method.
Now it wont fill the stack with junk, but you can also now check if a global exists via globalExists, it does not check its type, rather that the global is not nil. I may think about adding a couple helpers that check if its a function or table, etc, as well.
Thanks a lot, works like a charm. Some helpers would be useful for sure, but globalExists helps a lot already
I'd like to know if it's possible to check if a global function exists before doing invokeFunction or invokeVoidFunction.
If I try to call a function that doesn't exist, the stack keeps getting filled with "`attempt to call a nil value'" Any ideas on how to prevent this?
Thanks