mIRC Home    About    Download    Register    News    Help

Print Thread
#271642 07/05/23 11:34 PM
Joined: Jul 2006
Posts: 4,161
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,161
Code
alias wlerror mkdir wlerror\ | noop $findfile(wlerror\,*,0,.remove $qt($1-)) | var %a 200 | while (%a) { write -c wlerror\wlerror $+ %a | dec %a  } | noop $findfile(wlerror\,wlerror*,0,wlerrorcb $1-)
alias wlerrorcb {
  while (1) {
    noop A
    noop B
  }
  :error
  if ($error) {
    reseterror 
    echo -sg error in $1- : $v1
  }
}
Type /wlerror, it will freeze, hit control + break and hold the keys for a few second (until it doesn't freeze anymore)
You should see a few break errors and then a /while: loop not found error, the line number is the :error line.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,444
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,444
If I understand correctly, the issue you are reporting is the error message, not the behaviour? It looks like it should just say command halted.

Joined: Jul 2006
Posts: 4,161
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,161
Yes the while loop error is incorrect


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,444
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,444
Testing this further, it looks like the behaviour is not quite right here. Since you are using /reseterror to cancel the break, it should not be halting the script at that point. This issue will be fixed in the next beta.


Link Copied to Clipboard