mIRC Home    About    Download    Register    News    Help

Print Thread
#195640 28/02/08 01:52 PM
Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7
Could someone please tell me why the following doesn't work ??

Code:
On *:TEXT:*moo*:#war-online: if ($nick != sam) { describe #war-online lixx $nick } else { describe #war-online smax $nick }


To my mind this should lick everybody apart from sam who says "moo" in channel #war-online. If sam says "moo" he would be smacked.

However it doesn't fully work and I get the following error:

Quote:

ELSE Unknown command

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

For multiple commands on one line, you need to insert a | character, it's like starting a new line...

On *:TEXT:*moo*:#war-online: if ($nick != sam) { describe #war-online lixx $nick } | else { describe #war-online smax $nick }

Code:

On *:TEXT:*moo*:#war-online: {
  if ($nick != sam) { describe #war-online lixx $nick }
  else { describe #war-online smax $nick }
}



Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7

I LOVE you !! Thanks.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

I feel the love smile

Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7
Similarly, any idea what's wrong with this please ??
Code:
On *:TEXT:*xbox*:#war-online: if ($nick == sam) { ban # $address($nick,2) } { kick # $nick Console Muppet !! } | else { describe #war-online loves console gaming }


It ban/kicks sam if he mentions "xbox" but fails to do anything if anybody else does. What punctuation have I messed up this time ..

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Just don't put everything on one line.
Code:
on *:TEXT:*xbox*:#war-online:{
  if ($nick == sam) { ban # $address($nick,2) | kick # $nick Console Muppet !! }
  else { describe #war-online loves console gaming }
}

If you compare the two you'll see you missed some things.

Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7

Thanks and much love to you too !!

Unfortunately I am using the mirc interface to add these scripts individually (Tools/Scripts Editor) so I have to key them all in on one line - as it appears to save each of them as a numbered item frown


I'll just have to remember to keep adding "|" where you guys start new lines.

Last edited by moocifer; 28/02/08 04:02 PM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
What are you talking about? We ALL use that script editor to enter our scripts. What numbered items?
Adding scripts like mine is no problem whatsoever.

Last edited by 5618; 28/02/08 05:38 PM.
Joined: Feb 2008
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2008
Posts: 7
Well my remote.ini looks like this:
Quote:

[script]
n0= <script text>
n1= <script text>
n2= <script text>
n3= <script text>
n4= <script text>


Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

mIRC re-orders all of that when you save the script in the editor. You really don't have to open the script files at all.
Also, you could save the script in .mrc format which doesn't use the ini format at all.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
When loaded into a regular text editor it does. Presumably you're not seeing that when you look at that file in mIRC's Script Editor though? If you are then something is wrong.

The Script Editor should be hiding that from you - the numbers don't actually mean anything, they're just there because by default mIRC stores settings in INI files which require that formatting. You can spread scripts over as many lines as you want, the Script Editor will handle the INI formatting.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard