mIRC Home    About    Download    Register    News    Help

Print Thread
#170898 16/02/07 06:33 AM
Joined: Jul 2005
Posts: 37
G
gans Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 37
hi i think this is simple but im not sure how it works here is my test code
Code:
alias testing {
  var %num = 1
  while ($var(%test*,0) >= %Num) {
    echo $var(%test*,%num)
    inc %num
  }
}

that code works it finds %test1 and %test2 but how do i then read the var? its only showing me the name of the var not whats set inside it
the vars is just set as
%test1 testing1
%test2 testing2
just so i can test it any help plz thanks

gans #170899 16/02/07 06:46 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Use $eval to get the value or just use the .value property of $var

Code:
alias testing {
  var %num = 1
  while ($var(%test*,0) >= %Num) {
    echo $var(%test*,%num) -> $var(%test*,%num).value = $eval($var(%test*,%num),2)
    inc %num
  }
}


/help $var
/help $eval


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard