Open AufderWelt opened 4 years ago
Here's a (not ideal) workaround I've been using. I haven't found a way to suppress the error (including pcall):
function onObjectDestroy(dying_object)
if not _broken then
_broken = true
doActualBody()
_broken = false
end
end
When it does break, _broken is left set to true so future calls don't do anything. In my case I was getting hundreds of errors on exit, so I can live with just one now.
Describe the bug the
lua onObjectDestroy (dying_object)
functions triggers by exiting the game, which causes error messages, that the object reference passed tolua onObjectDestroy (dying_object)
is not validTo Reproduce Steps to reproduce the behavior:
open a single player table, add one object, add the code to global and save the game.
Expected behavior the function should not be triggered by exiting the game. it makes no sense
Tabletop Simulator Info:
Known workarounds Not Known
Link To TTS Post https://forums.tabletopsimulator.com/showthread.php?8929-onObjectDestroy-or-onDestroy-triggers-by-game-exit