mIRC Home    About    Download    Register    News    Help

Print Thread
$regml and $hfind #192838 11/01/08 04:02 PM
Joined: Jul 2006
Posts: 3,532
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,532
Accord to This thread there is a bug using $regml after using $hfind(name,regex,N,r).
mIRC just return the value of $regml for the last item in the hash table, even if N = 0 :

Code:
alias bugw {
  if ($hget(Ga)) hfree Ga
  var %a 4 ,%b . ; ? /
  while (%a) { hadd -m Ga $+(10,$token(%b,%a,32),10) | dec %a }
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,0,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,1,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,2,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,3,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,4,r) - $regml(0) - $regml(1)
}
$regml(0) and $regml(1) should return 0 and $null if N = 0 because there is no real match


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: $regml and $hfind [Re: Wims] #200766 11/06/08 11:15 AM
Joined: Jul 2006
Posts: 3,532
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,532
This bug hasn't been fixed in mIRC 6.32 cry


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: $regml and $hfind [Re: Wims] #200777 11/06/08 06:00 PM
Joined: Dec 2002
Posts: 4,488
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,488
Thanks this issue has been fixed for the next version.