Problem with While Loops - 11/03/03 06:19 AM
When I use this code it causes my mirc to freeze up.
Can anyone point out what is wrong with this code?
Can anyone point out what is wrong with this code?
Code:
[color:red] alias lsb_chk_lst { var %lsb.time = $ticks set %lsb_list 0 if ((%lsb.file == **) || (!$len(%lsb.file))) { msg $nick 12 No search string was entered2.... if ($ifmatch == **) msg $nick 12 Try again2.... halt } var %lsb.sflnm = $+(%lsb_rslt_dir,Result_,$replace(%lsb.file,*,_),.txt) var %lsb.cnt = 1 while ($findfile(%lsb_lst_dir,*.txt,%lsb.cnt)) { var %lsb.flnm = $ifmatch if ($left($nopath(%lsb.flnm),7) != Result_) { filter -ff %lsb.flnm %lsb.sflnm %lsb.file if (%lsb.sflnm) write %lsb.sflnm $chr(10) } inc %lsb_list 1 } var %lsb.fcnt = $lines(%lsb.sflnm) if ((!%lsb.fcnt) || (%lsb.fcnt < 13)) { msg $nick 2 L12ist 2S12earch 2B12ot Found4 NO12 matches for4 %lsb.file $+ 2.... msg $nick 12 Try a different spelling of4 %lsb.temp $+ 2.... .remove %lsb.send.flnm unset %lsb.send.flnm halt } set %lsb.flnm %lsb.sflnm %lsb.fcnts = %lsb.fcnt - 12 set %lsb.send.flnm %lsb.sflnm %lsb.time = $calc($timezone + (($ticks - %lsb.time) / 1000 )) msg $nick 2 L12ist 2S12earch 2B12ot Found 2[4 %lsb.fcnts 2] 12matches r4 %lsb.file 12in 2[04 $+($asctime($int(%lsb.time),n:ss),$gettok(%lsb.time,2,46)) 2] msg $nick 2 L12ist 2S12earch 2B12ot will now Dcc you a list of its findings2.... $lsb.send } [/color]