I have been trying to use the hotspots and mouse handlers.
Whenever I create an error in one of the mouse handler functions (I'm a rookie), the scripting error popup gets stuck in a loop or something and I have to force the client to quit.
So I'm wondering if there is some method to prevent that from happening aside from writing flawless code on the first try.
You don't need to write flawless code to avoid writing infinite loops.
Thank you but that isn't helpful at all.
It isn't from loops I write. It's like any generic sort of error, like arithmetic on a nil value or indexing a nil or string expected but got a number, etc.
When that happens in a mouse handler function then the scripting error just keeps repeating every time I attempt to close the popup.
I was asking if there is some setting I have missed that prevents that. If not, then this is meant as a suggestion to include that feature.
I've forced an error in all of the hotspot handlers I know of now. I should have done that first maybe.
It seems only when an error happens in the dragmove handler that it keeps repeating and the popup goes loopy.
Ok so never mind. It isn't infinite and the popup will close eventually. Somehow the dragmove function is calling a dozen times or so right out of the gate and the errors are just stacking up. Sorry.
I suggest you turn on the "errors to the output window". That pop-up window is particularly annoying.
I did more digging and put a counter in the dragmove function. If I hold down the mouse button, the function will call about once per second. I assume there's a good reason for that and that it is written into a hardware interrupt thingy.
If I force an error, that safety seems to be ignored and the function gets called as fast as it can be while the mouse button is held down. Apparently it takes about 50 calls before my brain, eyes, and finger react to the error popup and release the button, stacking all of the popups.