mIRC Home    About    Download    Register    News    Help

Print Thread
mIRC errors? #246065 22/05/14 12:05 AM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
for some reason when i tried making this new script it just said error for every command i was trying to do. Here is my script:
Code:
on *:TEXT:!giveaway start *:#:{
  if ($read(sreglist.txt,nw,$nick)) {
    if (%giveaway == off) {
      	     set -e %giveaway on
      	     msg $chan giveaway started. Clearing old giveaway list. Please say " $+ $3 $+ " to enter the giveaway!
      	     write -c giveaway.txt
      	     write -c GiveawayWord.txt
      	     .timerWriteGiveawayWord 1 1 write GiveawayWord.txt $3 
    }
    elseif (%giveaway == on) msg $chan a giveaway is still on. please end it by saying "!giveaway end"		 
    else msg # error, please !giveaway end to fix this
  }
}
on *:TEXT:!giveaway end:#:{
  if ($read(sreglist.txt,nw,$nick)) {
    set -e %giveaway off
    msg $chan Giveaway has ended. entries: $lines(giveaway.txt) $+ . Please do !draw to pick a winner!
  }
}
on *:text:!draw:#:{ 
  if ($read(sreglist.txt,nw,$nick)) {
    var %giveawaywinner = $read(giveaway.txt)
    if (%giveaway == off) { msg $chan The winner is %giveawaywinner $+ !! If you would like to pick another winner draw again. you can message mark here http://www.twitch.tv/message/compose?to=mark_paintball and you can message the winner here http://www.twitch.tv/message/compose?to= $+ %giveawaywinner }
    elseif (%giveaway == on) { msg $chan The giveaway is still on! please do "!giveaway end" }
  }
}
on *:text:*:#:{
  if (%giveaway == on) {
    if ($read(GiveawayWord.txt,nw,$1)) {
      if (!$read(giveaway.txt,nw,$nick)) {
        write giveaway.txt $nick
      }
    }
  }
}

Here is what my error log is:

Please help. Also feel free the fix up my script, i made it in 30 minutes and isn't the best quality.


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: mIRC errors? [Re: judge2020] #246067 22/05/14 12:31 AM
Joined: Jan 2004
Posts: 1,274
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,274
Did you edit this in another text editor with tabs instead of spaces?

Re: mIRC errors? [Re: Loki12583] #246069 22/05/14 01:18 AM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Originally Posted By: Loki12583
Did you edit this in another text editor with tabs instead of spaces?

Ya that's probably it.
How do I fix this?


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: mIRC errors? [Re: judge2020] #246070 22/05/14 01:28 AM
Joined: May 2014
Posts: 10
startgame Offline
Pikka bird
Offline
Pikka bird
Joined: May 2014
Posts: 10
Originally Posted By: judge2020
Originally Posted By: Loki12583
Did you edit this in another text editor with tabs instead of spaces?

Ya that's probably it.
How do I fix this?


Try this. I went ahead and fixed the space issue; just paste in mIRC and test. If you still are thrown the same errors, let me know and I will go through it.

Code:
on *:TEXT:!giveaway start *:#:{
  if ($read(sreglist.txt,nw,$nick)) {
    if (%giveaway == off) {
      set -e %giveaway on
      msg $chan giveaway started. Clearing old giveaway list. Please say " $+ $3 $+ " to enter the giveaway!
      write -c giveaway.txt
      write -c GiveawayWord.txt
      .timerWriteGiveawayWord 1 1 write GiveawayWord.txt $3 
    }
    elseif (%giveaway == on) msg $chan a giveaway is still on. please end it by saying "!giveaway end"		 
    else msg # error, please !giveaway end to fix this
  }
}
on *:TEXT:!giveaway end:#:{
  if ($read(sreglist.txt,nw,$nick)) {
    set -e %giveaway off
    msg $chan Giveaway has ended. entries: $lines(giveaway.txt) $+ . Please do !draw to pick a winner!
  }
}
on *:text:!draw:#:{ 
  if ($read(sreglist.txt,nw,$nick)) {
    var %giveawaywinner = $read(giveaway.txt)
    if (%giveaway == off) { msg $chan The winner is %giveawaywinner $+ !! If you would like to pick another winner draw again. you can message mark here http://www.twitch.tv/message/compose?to=mark_paintball and you can message the winner here http://www.twitch.tv/message/compose?to= $+ %giveawaywinner }
    elseif (%giveaway == on) { msg $chan The giveaway is still on! please do "!giveaway end" }
  }
}
on *:text:*:#:{
  if (%giveaway == on) {
    if ($read(GiveawayWord.txt,nw,$1)) {
      if (!$read(giveaway.txt,nw,$nick)) {
        write giveaway.txt $nick
      }
    }
  }
}

Re: mIRC errors? [Re: startgame] #246071 22/05/14 02:18 AM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
I prefer use variable instead of writing giveawayword to txt file.
Code:
on *:TEXT:!giveaway start *:#:{
  if ($read(sreglist.txt,nw,$nick)) && ($3 != $null) {
    if (%giveaway == off) || (%giveaway == $null) {
      set -e %giveaway on
      msg $chan giveaway started. Clearing old giveaway list. Please say " $+ $3 $+ " to enter the giveaway!
      write -c giveaway.txt
      set -e %giveawayword $3
    }
    elseif (%giveaway == on) msg $chan a giveaway is still on. please end it by saying "!giveaway end"		 
  }
}

on *:text:%giveawayword:#:{
  if (%giveaway == on) && !$read(giveaway.txt,nw,$nick)) {
    write giveaway.txt $nick
  }
}

Re: mIRC errors? [Re: blessing] #246074 22/05/14 03:24 AM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Thanks for all the help!


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball