mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 1
A
A2000 Offline OP
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Aug 2014
Posts: 1
Hello, I have a problem with a code, I know I'm not very good at mIRC Scripting, but I don't see what the error can be, I have also tried including empty else statements and the error still there.

My code is:

Code:
; ----------
;| RE-TWEET |
; ----------

on *:TEXT:!tweet on:#:{
  if ($nick == NICKNAME) {
  if (%tweet == On){ return }

  set %tweet On

  var %tweetID $read(tweet.txt,n)

  var %link $+(https://twitter.com/SOME_ONE/status,%tweetID)

  msg # /me Test: %link
  .timerTweet 3 10 msg # /me Test: %link
}
}


on *:TEXT:!tweet off:#:{
if ($nick == NICKNAME) {
if (%tweet == Off){ return }

set %tweet Off
.timerTweet Off
}
}


According to mIRC I don't need the 2 brackets at the end of each on *:TEXT... but I only need one.

But, from what I can see, if I only use 1 then I'm not closing the "on" code.

Any idea why this is happening?

What I'm doing wrong?

PS: This is the code that "has no error" for mIRC

Code:
; ----------
;| RE-TWEET |
; ----------

on *:TEXT:!tweet on:#:{
  if ($nick == NICKNAME) {
  if (%tweet == On){ return }

  set %tweet On

  var %tweetID $read(tweet.txt,n)

  var %link $+(https://twitter.com/SOME_ONE/status,%tweetID)

  msg # /me Test: %link
  .timerTweet 3 10 msg # /me Test: %link
}


on *:TEXT:!tweet off:#:{
if ($nick == NICKNAME) {
if (%tweet == Off){ return }

set %tweet Off
.timerTweet Off
}

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Quote:
if (%tweet == On){
You must put a space before { here


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

Link Copied to Clipboard