cfrag Posted May 3, 2021 Posted May 3, 2021 I've just returned from a debugging trip from hell that almost landed me in the looney bin. Reason: when you set up a callback via missionCommands.addCommand (and their siblings), it seems that when the callback is invoked, Lua suppresses any errors that occur. Should your code do something wrong (e.g. miss a parameter, or dereference nil) it will simply fail silently, without any indication that something has gone wrong. Unless you know what to look for, this can drive you insane (of course I was unlucky enough to insert an error into the debug code that ALSO failed silently - go figure). Does anyone know why this is, and how I can fix that? For debugging purposes I now relay all command callbacks via a scheduled invocation after 0.1 seconds, but that is an ugly cludge that does not scale well Thanks for any pointers.
Toucat Posted October 12, 2023 Posted October 12, 2023 Hi, I am wondering if you managed to find a solution/scalable alternative. I am running into the same issue right now and would rather not route all functions through something like a scheduled function. Many thanks in advance.
Recommended Posts