mIRC Home    About    Download    Register    News    Help

Print Thread
#192838 11/01/08 04:02 PM
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #200766 11/06/08 11:15 AM
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
This bug hasn't been fixed in mIRC 6.32 cry


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #200777 11/06/08 06:00 PM
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks this issue has been fixed for the next version.


Link Copied to Clipboard