mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
/sockmark doesn't report an error when the name of the socket provided does not exist (the result of a typo when using static name, in my case). I think it should halt with an error "* /sockmark: 'name' no such socket." like /sockwrite is.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for your bug report. The main issue with such a change is that, as it has always behaved this way, all existing scripts that assume it is okay to /sockmark without checking for existence of the socket would break.

There are quite a few scripting features that do not display errors in similar situations. At the time of implementation, this was either requested or it seemed like a good idea. In retrospect, I would have preferred to have made the scripting language consistently strict in all contexts. Unfortunately, it is hard to apply this now without breaking scripts.

Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Right, this happened to me again (forgot to use the socket name!) and I'm mad that mIRC does not report the error.

Here only a script which were using "/sockmark nonexistingsocket value" would break, this is ridiculous, there is no such script and why would you support that.

I believe your concern is that if such a script were to exist, with the current behavior, it's not halting the script with an error and allow the rest of the script to run. Where changing this would halt and stop the next command from being executed.

What about a compromise where it doesn't halt but display an error?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard