4 ms·
The first thing I do is to wrap the entire Lua script in a pcall in order to intercept and display occurring exceptions. As for desyncs there is https://www.hi
by vince14 7y ago
The first thing I do is to wrap the entire Lua script in a pcall in order to intercept and display occurring exceptions.
As for desyncs there is https://www.hiveworkshop.com/threads/desync-checker-for-jass-snippets.318534/ https://www.hiveworkshop.com/threads/desync-checker-for-jass...
The archive contains text files which are very helpful in understanding which functions are responsible for desyncs.
- mashlol 7y agoThe `pcall` thing is interesting, didn't think of that. Will it apply to anonymous functions as well? For example, if I wrap my main in pcall, and then set up trigger calls, I expect the pcall won't apply to whenever the trigger callbacks are hit. As for the desync checker, I've been down that rabbit hole - I removed every async method from the codebase and still had desync issues. I am starting to suspect its an issue with some new native that I am not thinking of, but it's a very slow process to track it down, since I need to get ~5 random players in my game every time to test it, and even if no desync happens it doesn't really mean its solved.
- vince14 7y agoYea the trigger actions need to be wrapped in a pcall too. Because of that I made a function for trigger creation which wraps the provided action in a pcall.