I have recently started transitioning my scripts to work with the event system in Mudlet in a more comprehensive manner, but I have run into a problem. When I disable a script, its event handler is still getting called when the event occurs, and everything seems to work as if the script were active. I also can't use the isActive function to determine if the script is active and control its behavior in that way. Any suggestions on how I can ensure that functions in disabled scripts don't fire?
Thanks.
Inactive Scripts Still Running
Re: Inactive Scripts Still Running
How are you disabling it? A disabled scripts event handler won't fire, but if you're calling the function directly, it will work.
Re: Inactive Scripts Still Running
I am disabling it by in checking the check box next to it. But I think I see the issue. I'm registering anonymous event handlers to avoid problems if someone changes the script names, but those are then handled independently from the script itself, and so are still getting called.
So, there is no way to check to see if a script is active or not? If not, I guess I'll design a work around instead.
So, there is no way to check to see if a script is active or not? If not, I guess I'll design a work around instead.
Re: Inactive Scripts Still Running
There isn't at the moment. isActive() just works for timer, trigger and alias.