mIRC Home    About    Download    Register    News    Help

Print Thread
#250362 11/01/15 10:06 AM
Joined: Jan 2015
Posts: 2
A
Abata Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Jan 2015
Posts: 2
I am having trouble making a script that saves and joins channels automatically on start. Heres the code I've been working on it for a while. Hope someone can help
Code:
var %i
var %p = 0
var %channel
on *:text:!join:#:{
  inc%p
  set %channel.%p $chr(35)$+$lower($nick)
  join $chr(35) $+ $lower($nick)
}


on *:CONNECT:{
  set %i = 1
  while(%channel.%i != null){
  join $channel.%i
  inc%i
}
}

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You have floating code at the top. The first 3 lines don't belong.

You need to work on your general syntax. Spaces are missing between inc and %variable, or around $+'s, etc.

I recommend you practice writing Aliases before you start writing Event driven scripts. Get your syntax down with aliases you can type and get a predicted behavior nailed down.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard