mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
is there any way to make the format of this error neater?

i hate these types of errors showing in the status,

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
neater? It tells you what's needed for you to locate where the error is and what kind of error, so that you can go into the code and fix it, so that the error doesn't show. The only way that I know of to keep them from showing in the status window is to ensure that your code is written well enough that they can't show up.

Joined: Aug 2006
Posts: 22
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Aug 2006
Posts: 22
Is their anyway to listen for them atleast? I agree if they happen you should fix em, but it's good to have redundancy in the code to catch and repair damages if something unforeseen happens instead of bringing the whole show to a halt.

Last edited by netsplit; 01/09/06 02:14 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That depends on the quality of the code. I've seen codes that were so excellently written that every possible error was covered, which means that while there might be an error generated, something else in the code caught it before the error was actually generated, which would've caused the code to halt.

One possibility that I've seen (although I haven't worked with it myself, so far) is the ON ERROR event.

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
on ERROR has nothing to do with mIRC errors. It triggers when the IRC server sends an ERROR command.

As for the original question.
Code:
alias long {
  echo -a $str(*,$1)
  return

  :error
  echo -a Encountered an error:4 $error
  reseterror
}


Use:

/long 1
/long 10
/long 100
/long 1000

-genius_at_work

Joined: Dec 2005
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
or you can try this ;

Code:
alias write {
$iif($len($1-) => 900,write $+($left($1-,900),...),write $1-)
}

Last edited by SCNDRL; 01/09/06 02:33 PM.

i like that
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks. I did say that I'd never used it before, so it was the only thing that I was able to think of quickly that might have had some reference.


Link Copied to Clipboard