mIRC Home    About    Download    Register    News    Help

Print Thread
Stuck on this one. #240952 09/03/13 12:08 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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
  }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Stuck on this one. [Re: sparta] #240953 09/03/13 12:16 PM
Joined: Jul 2006
Posts: 3,925
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,925
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel