mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Apr 2014
Posts: 2
Code:
on *:TEXT:imp *:#: { msg $chan $read(C:\Users\Shin3\Desktop\twitch\imp.txt) }
/*
on event of someone in any channel typing imp (any other text after aswell) send a random line to that channel.
*/

It is supposed to read a random line from the text file, which it does sometimes but not always and mostly just in one channel as far as I can tell.

Any help is appreciated.

Last edited by Spawnova; 11/04/14 08:18 PM.
Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191

Code:
on *:TEXT:imp *:#:{
  var %i 1
  while !%text && %i < 5 {
    var %text $read(C:\Users\Shin3\Desktop\twitch\imp.txt) 
    inc %i
  }
  if %text { msg $chan %text }
  else { echo -ag Error: There is something wrong with your imp.txt file. }
}


Joined: Apr 2014
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Apr 2014
Posts: 2
So far no issues, thanks. =)


Link Copied to Clipboard