mIRC Home    About    Download    Register    News    Help

Print Thread
#73223 29/02/04 09:38 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
execute { return $1- }
for {
  execute $1
  if $right($3,2) == ++ { var %type inc } 
  elseif $right($3,2) == -- { var %type dec }
  while $gettok($2,1,32) $gettok($2,2,32) $gettok($2,3,32) { 
    %type $left($3,-2)
    execute $4-
  }
}

typing:
//.echo -q $for(var %x 1,%x <= 10,%x++,echo -s %x)
gives the following error:
-
* /while: '10' unknown operator (line 13, aliases.ini)
-
anyone know why?


New username: hixxy
#73224 01/03/04 12:40 PM
Joined: Dec 2002
Posts: 230
G
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
because your variables are evaluated before they are passed to the alias.

#73225 01/03/04 12:50 PM
Joined: Apr 2003
Posts: 414
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
if after elseif $right($3,2) == -- { var %type dec } i put echo -set $gettok($2,1,32) $gettok($2,2,32) $gettok($2,3,32) in the status i see <= 10..
So error cause of the error is While <= 10..

And //.echo -q $for(var %x 1,%x <= 10,%x++,echo -s %x) must be //echo $for($eval(var %x 1,0),$eval(%x <= 10,0),$eval(%x++,0),$eval(echo -s %x,0))


mIRC Chm Help 6.16.0.3 Full Anchored!
#73226 01/03/04 01:12 PM
Joined: Apr 2003
Posts: 414
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
Here is you alias..
Nice parser grin
Code:
for {
  if $right($eval($3,1),2) == ++ { var %type inc }
  elseif $right($eval($3,1),2) == -- { var %type dec }
  set $eval($left($eval($3,1),-2),1) 0 | ;For some reson.. Var don't work here..
  while $eval($gettok($2,1,32),2) $eval($gettok($2,2,32),2) $eval($gettok($2,3,32),2) {
    $eval($4-,2)
    %type $left($eval($3,1),-2)
  }
}

//echo $for($eval(var %x 1,0),$eval(%x <= 10,0),$eval(%x++,0),$eval(echo -s %x,0))
Show to me

0
1
2
3
4
5
6
7
8
9
10


mIRC Chm Help 6.16.0.3 Full Anchored!

Link Copied to Clipboard