mIRC Home    About    Download    Register    News    Help

Print Thread
#254765 31/08/15 04:08 PM
Joined: Aug 2015
Posts: 2
C
Bowl of petunias
OP Offline
Bowl of petunias
C
Joined: Aug 2015
Posts: 2
i've made a script that when a specific person joins it starts, it then goes on to call each timer before looping back on itself, the problem is when it messages the channel it sends each message 3 times rather than 1?
Code:
alias repeat1 {
  msg #<chan> <msg>
  timer 1 300 repeat2
}
alias repeat2 {
  msg #<chan> <msg>
  timer 1 300 repeat3
}
alias repeat3 {
  msg #<chan> <msg>
  timer 1 300 repeat1
}

on !*:join:#: {
  if($nick != <nick>) { return }
  timer 1 300 repeat1
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Are you sure this isn't endless? You're calling alias1 with alias3 creating a looparound.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Endless but with a 300 seconds pause between each call, and mIRC is working as it should during this 300 seconds so it's not so much a problem in itself smile

@OP: you are missing a space in the if statement:

Quote:
if ($nick != <nick>) { return }

Last edited by Wims; 01/09/15 03:06 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
This happens because each alias calls one of the others!
repeat1 calls repeat2, which calls repeat3 which calls repeat1 and so on. All 3 aliases contain msg #<chan> msg . Plus this will end up flooding your channel very soon because tones of timers begin with each join. I haven't exactly undesrtood what you wanna do so i can propose a fix. smile


Link Copied to Clipboard