mIRC Homepage
So the goal is to make a "timed" click-to-tweet, but instead of it being an actual timer running and outputting every hour (can become spammy on Twitch channels with few/no viewers) it would instead output after a certain number of lines defined (hard coded to 35, but may change to an adjustable variable).

Code:
on *:text:*:#fonic_artes: {
  if (%cttlines < 35) {
    inc %cttlines
  }
  if (%cttlines = 35) {
    msg # (CTT_MESSAGE) %tweeturl
    set var %cttlines = 0
  }
}

alias cttlines {
  var %cttlines = 0
}


I was thinking setting an alias would work, but I may be thinking backwards on it.
Was that a question?
Yes, I was unable to actually get it trigger, and I was hoping if there was an actual issue with the code if it could be pointed out or help point me in the right direction.
You need double "=" in if-condition to make it work. Alias can be deleted, no use for it. "set var %blabla = 0" should be "set %blabla 0".
p.s. when you create %x in alias with /var command - it will be unseted when alias is over, thats another reason to delete your alias.
Thanks, I appreciate the help in fixing the code. I ended up making some simple mistakes with missing the "==" part.

With this, I can use this in a nice thing later on.

Cheers.
© mIRC Discussion Forums