mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 18
K
kinnu Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2003
Posts: 18
I was working with text that consists of | (pipe,$chr(124)) delimited tokens. I made a stupid error and it's completely my fault, but the way mirc reported the error left something to be desired. Turns out mirc delays all "unknown command" error message for several seconds, making locating the origin extremely hard.

Code:
alias delayederror {
  echo -s calling concatenate
  var %dummy = $concatenate(AA,BB)
  echo -s back from concatenate
  echo %dummy
}

alias concatenate {
  echo -s entered concatenate
  ; Next time try to remember pipe is a command separator...
  var %retval = $1 $+ | $+ $2
  echo -s leaving concatenate
  return %retval
}
 

Running /delayederror produces:

calling concatenate
entered concatenate
leaving concatenate
back from concatenate
AA
-
BB Unknown command
-

Why is it like that? It doesn't even show the message immediately when the script finishes, it actually waits a good 3-5 seconds, during which there may be events that cause other scripts to run, so you can't even be sure which script is causing that error! Surely it would be much more helpfull to report the error when it happens:

calling concatenate
entered concatenate
-
BB Unknown command
-
leaving concatenate
back from concatenate
AA

Alternatively (or additionally) the message should also indicate the script & line of the error.
BB Unknown command in script.mirc line 125

Code:
alias simpler_example {
  echo -s Entered 
  badcall
  echo -s Left
}

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
The unknown command message is sent by the server, if there is a lag between you and the server then it isn't an mIRC bug, nor is there anything mIRC can do about it.

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Not much that can be done about that, it's cause mIRC is single threaded.

Joined: May 2003
Posts: 18
K
kinnu Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: May 2003
Posts: 18
> The unknown command message is sent by the server, if there is a lag between you and the server then it isn't an mIRC bug, nor is there anything mIRC can do about it.

Doh! Don't i feel like a real idiot, I should have remebered that..

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Quote:
Not much that can be done about that, it's cause mIRC is single threaded.

What does mIRC being single threaded have to do with giving an unknown command message "a good 3-5 seconds" later? Unless he has an incredibly slow computer then it is because of lag, nothing to do with how many threads mIRC has..

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Quote:
What does mIRC being single threaded have to do with giving an unknown command message "a good 3-5 seconds" later?

Everything? He didn't really give all that much info, so I have to make some assumptions. Consider the scenario where it is done in a loop that takes a long time to terminate. mIRC won't display the error messages until the loop terminates.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Does the script he gave as an example have a loop in it? I don't see one.

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I'm sorry I misread what he typed, I'll attempt to be more perfect like you in the future...


Link Copied to Clipboard