mIRC Home    About    Download    Register    News    Help

Print Thread
Customizing Script Error #162740 22/10/06 03:09 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
is there any way to either add on the this, or customize it?
Quote:

-
* /sockopen: 'ophours' socket in use (line 96, xxHour-Panel)
-


-Kurdish_Assass1n
Re: Customizing Script Error #162741 22/10/06 03:15 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Code:
alias example {
  sockwrite fop example
  return
  :error
  echo -ac info $error -- <your message here>
  reseterror
}


/help $error, and scroll down to Error handling


Gone.
Re: Customizing Script Error #162742 22/10/06 03:16 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
Two ways:

1.
Code:
if ($sock(ophours)) { ; display custom error and return }


2.
Code:
sockopen ophours ... ...
return
:error
var %err = * /sockopen: 'ophours' socket in use (line 96, xxHour-Panel)
if ($error == %err) {
  ; Display custom error
  reseterror
}

Re: Customizing Script Error #162743 22/10/06 03:27 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I'm not talking only about sockets, I just used that as an example, is there a way to control ALL the errors? is it Error Handling?


-Kurdish_Assass1n
Re: Customizing Script Error #162744 22/10/06 03:33 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
Yeah. FiberOPtics' post explains how you would go about capturing errors in general smile

Re: Customizing Script Error #162745 22/10/06 03:39 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
ok, got it, thanks guys.


-Kurdish_Assass1n