mIRC Home    About    Download    Register    News    Help

Print Thread
Invalid Format: $evalnext #167789 30/12/06 04:45 PM
Joined: Oct 2003
Posts: 214
S
Sephiroth_ Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
This happens if i use $eval(%var,2) and the var contains an invalid Identifier like "$address(" if i use eval brackets i get the correct error message for $address and so on.

This is with eval brackets
Code:
alias eval1 {
  var %i = $$1-,%o = [ [ %i ] ],%o = $iif(%o != $null,$ifmatch,$!null)
  goto end
  :error
  var %o = $gettok($gettok($error,1,40),2-,32)
  reseterror
  :end
  echo -a * %i == %o 
}


And this with $eval
Code:
alias eval2 {
  var %i = $$1-,%o = $iif($eval(%i,2) != $null,$ifmatch,$!null)
  goto end
  :error
  var %o = $gettok($gettok($error,1,40),2-,32)
  reseterror
  :end
  echo -a * %i == %o 
}


one step closer to world domination
Re: Invalid Format: $evalnext [Re: Sephiroth_] #168844 15/01/07 03:10 PM
Joined: Dec 2003
Posts: 61
A
Aeron Offline
Babel fish
Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
Does the ']' 'attached' to the ',' not give evaluation problems?

alias eval1 {
var %i = $$1-,%o = [ [ %i ] ],%o = $iif(%o != $null,$ifmatch,$!null)
goto end
:error
var %o = $gettok($gettok($error,1,40),2-,32)
reseterror
:end
echo -a * %i == %o
}

Does
Code:
alias eval1 {
  var %i = $$1-,%o = [ [ %i ] ] ,%o = $iif(%o != $null,$ifmatch,$!null)
  goto end
  :error
  var %o = $gettok($gettok($error,1,40),2-,32)
  reseterror
  :end
  echo -a * %i == %o 
}

give the same probs as $eval ?

Last edited by Aeron; 15/01/07 03:10 PM.
Re: Invalid Format: $evalnext [Re: Aeron] #168970 17/01/07 03:28 PM
Joined: Oct 2003
Posts: 214
S
Sephiroth_ Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
$eval($address(,2) returns invalid format: $evalnext and [ [ $address( ] ] returns invalid format: $address

so $eval($address(,2) should return also invalid format: $address and not $evalnext

and the bracket next to the comma won't make problems smile


one step closer to world domination
Re: Invalid Format: $evalnext [Re: Sephiroth_] #168979 17/01/07 06:46 PM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Well, $eval($address(,2) isn't really about $eval and/or $evalnext. Any identifier will fall into the same situation. For instance, $left($address(,1) shows "Invalid format: $left". There's no bug, though: mIRC assumes you're telling it to evaluate $left($address(,1), which results in $null returned by $address(,1) and then an error caused by a missing ')' bracket for $left(.

However, in your first post, you showed a situation where mIRC shouldn't do the same thing as above (when the wrong identifier syntax is represented by a %variable). To me, that's a bug in $eval().

Edit: By the way, regardless that $evalnext() is obviously connected to $eval(), I think there should be no $evalnext()-related error messages when you've not used it at all.

Last edited by cold; 17/01/07 06:53 PM.

* cold edits his posts 24/7