mIRC Home    About    Download    Register    News    Help

Print Thread
A
Amun
Amun
A
This does not work:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy)
{
if ($server == chicago.us.p2pirc.org) {
/nsp2p | /j supertorrents | /j stmusic | /j pre
}
}
}

However, this does:

on *:CONNECT: {
if ($me == sas) || ($me == squatchy) && ($server == chicago.us.p2pirc.org) {
nsp2p
j #supertorrents
j #stmusic
j #pre
}

Am I just not seeing it? If I remove the nickname checking part in the first one, it works fine... But not with it in it.

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
The reason the first one won't work is that a bracket is misplaced.
Quote:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy)
{

Should be:
Quote:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy) {

T
Trixar_za
Trixar_za
T
Yes the bracket and I can see you've programmed in C smile

May I just suggest that you use $network instead of $server, it's more flexible because it the same for all servers in the network, which helps if you connect to the round ribbon address (irc.whatever.com) instead of directly to a certain server (bleh.whatever.com).

Just thought that would help smile - later

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
You might be interested in looking at some other syntax rules that differ from C http://kthx.net/ftb/#34

T
Trixar_za
Trixar_za
T
Also I'll add to argv0's link's list of difference, that mIRC scripts don't like TAB. One time I spent hours looking for the error in my script, which I just couldn't find, only to discover that I used TAB instead of spacebar with a few lines of code.


Link Copied to Clipboard