mIRC Homepage
Posted By: sparta Stuck on this one. - 09/03/13 12:08 PM
I cant find the problem in my code, but it ends up in a endless loop. The hash table is named "xcludeameamsg", and it exist with 1 channel added to it.
Code:
alias ame {
  ; $urlc($1-) is alias that underline url's in the channel.
  var %d = 1, %line = $urlc($1-)
 
 while ($chan(%d)) {
    var %chan = $v1

    ; if not true the script should go on.
    if (!$xcludeaa(%chan)) {
      .describe %chan $1-

      ; $ts return timestamp.
      ; $acme returnd the nick of me with the style i want.
      !echo -m %chan $ts $acme %line
 
     inc %d
    }
  }
}
alias xcludeaa {
  var %e = 1
  while ($hfind(xcludeameamsg,$+(*,$1,*),%e,w)) {

  ; if the channel exist in hashtable it return $true
    if ($v1 isincs $1) { return $true }

    inc %e
  }
}
Posted By: Wims Re: Stuck on this one. - 09/03/13 12:16 PM
You are only incrementing %d inside a condition for the loop in the first alias, if that condition becomes false, you have an endless loop.
© mIRC Discussion Forums