mIRC Home    About    Download    Register    News    Help

Print Thread
* /write: line too long (line 91, Nicklogger) #158100 01/09/06 01:35 AM
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,

Re: * /write: line too long (line 91, Nicklogger) #158101 01/09/06 01:51 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.

Re: * /write: line too long (line 91, Nicklogger) #158102 01/09/06 02:10 AM
Joined: Aug 2006
Posts: 22
N
netsplit Offline
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.
Re: * /write: line too long (line 91, Nicklogger) #158103 01/09/06 02:14 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.

Re: * /write: line too long (line 91, Nicklogger) #158104 01/09/06 03:17 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
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

Re: * /write: line too long (line 91, Nicklogger) #158105 01/09/06 02:33 PM
Joined: Dec 2005
Posts: 58
S
SCNDRL Offline
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
Re: * /write: line too long (line 91, Nicklogger) #158106 01/09/06 10:34 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.