Eval Script
Posted by snang
Saturday, July 31, 2004
Description: Eval script that returns errors.

This snippet will return the syntax errors, as well as $null, and the process time.

Enjoy.

alias e {
  var %ticks $ticks
  if ([ [ $1- ] ] != $null) { msg $active [^B] $+ $chr(91) $+ [^B] $1- [^B] $+ $chr(93) $+ [^B] == [ [ $1- ] ] - $calc($ticks - %ticks) $+ ms }
  else { msg $active [^B] $+ $chr(91) $+ [^B] $1- [^B] $+ $chr(93) $+ [^B] == $ $+ null - $calc($ticks - %ticks) $+ ms }
  :error
  var %temperr = $error
  if (%temperr) { msg $active [^B] $+ $chr(91) $+ [^B] $1- [^B] $+ $chr(93) $+ [^B] == [^B] $+ $gettok($gettok($gettok(%temperr,1-,32),2,58),1,32) $+ [^B] - $remove($gettok(%temperr,1,58),*)  - $calc($ticks - %ticks) $+ ms }
  reseterror
  haltdef
}
Subject line
Posted by `Slipknot-
Saturday, July 31, 2004 01:05pm PDT
bleh..now everyone is gonna release their eval scripts to the site.
Subject line
Posted by snang
Sunday, August 01, 2004 12:41am PDT
Nah, this one is similar to binge's, it returns the error messages, syntax, params, etc.

Someone might find it useful.  So...so...SHUT UP...or something.
Subject line
Posted by `Slipknot-
Sunday, August 01, 2004 08:12am PDT
Then they can read the help file - error handling isn't new, afaik.
Depends...
Posted by knightrage
Monday, August 02, 2004 02:52am PDT
Error handling was added in mIRC 6.14 so its kinda new.

I think its a useful script snang. I've seen countless (well, maybe 2 or 3) times when someone came into #script asking for one.
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world