mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2006
Posts: 1
G
Mostly harmless
OP Offline
Mostly harmless
G
Joined: Dec 2006
Posts: 1
I am looking for something to act like a case structure in the scripting.

The script I am making needs to do this:

%Number

Case:Count
1: /say One!
2: /say Two!
Default: /say What?

--
How would I do that with mIRC?

GreenFenix


GreenFenix
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Example only:
Code:
on *:text:!count*:#:{
var %number = $2
if %number == 1 { say One }
elseif %number == 2 { say Two }
else say What?
}


If you search the Feature Suggestions section, you will find that some people have requested that the Case structure be added to the mIRC scripting area, so that your example would work directly.


Link Copied to Clipboard