Closed 1ToastyBred1 closed 3 months ago
The main idea is to set up a hook that triggers upon Lua executing a new line:
state.SetDebugHook(KeraLua.LuaHookMask.Line, 0);
state.DebugHook += State_DebugHook
In the event handler, if needed (e.g. runtime exceeded), raise an exception to halt the script:
sender.State.Error()
Remember to catch the exception in the .NET code.
Oh thanks, I haven't noticed you commenting, it works so I will close issue as completed.
what if user makes infinite loop? how do i stop NLua from executing without disposing it