[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Forum
. -> [Folder]  Suggestions
. . -> [Subject]  Scripting Error Popup

Scripting Error Popup

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mkn07   (5 posts)  [Biography] bio
Date Sat 04 May 2013 01:48 AM (UTC)
Message
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.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Sat 04 May 2013 02:27 AM (UTC)
Message
You don't need to write flawless code to avoid writing infinite loops.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Mkn07   (5 posts)  [Biography] bio
Date Reply #2 on Sat 04 May 2013 03:33 AM (UTC)
Message
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.
[Go to top] top

Posted by Mkn07   (5 posts)  [Biography] bio
Date Reply #3 on Sat 04 May 2013 04:52 AM (UTC)
Message
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.
[Go to top] top

Posted by Mkn07   (5 posts)  [Biography] bio
Date Reply #4 on Sat 04 May 2013 05:26 AM (UTC)
Message
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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sat 04 May 2013 07:16 AM (UTC)
Message
I suggest you turn on the "errors to the output window". That pop-up window is particularly annoying.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Mkn07   (5 posts)  [Biography] bio
Date Reply #6 on Sat 04 May 2013 09:28 AM (UTC)
Message
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.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


20,718 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]