mIRC Home    About    Download    Register    News    Help

Print Thread
#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,.) }
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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

Link Copied to Clipboard