mIRC Homepage
Posted By: Kurdish_Assass1n Customizing Script Error - 22/10/06 03:09 PM
is there any way to either add on the this, or customize it?
Quote:

-
* /sockopen: 'ophours' socket in use (line 96, xxHour-Panel)
-
Posted By: FiberOPtics Re: Customizing Script Error - 22/10/06 03:15 PM
Code:
alias example {
  sockwrite fop example
  return
  :error
  echo -ac info $error -- <your message here>
  reseterror
}


/help $error, and scroll down to Error handling
Posted By: hixxy Re: Customizing Script Error - 22/10/06 03:16 PM
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
}
Posted By: Kurdish_Assass1n Re: Customizing Script Error - 22/10/06 03:27 PM
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?
Posted By: hixxy Re: Customizing Script Error - 22/10/06 03:33 PM
Yeah. FiberOPtics' post explains how you would go about capturing errors in general smile
Posted By: Kurdish_Assass1n Re: Customizing Script Error - 22/10/06 03:39 PM
ok, got it, thanks guys.
© mIRC Discussion Forums