Please PLEASE add SWITCH's for Scripting within mIRC, to replace lots of Ifs... an example would be..

With IF's....
alias moo {
var %moo = $1
if (%moo == cow) { echo -a moo cow }
else if (%moo == dog) { echo -a moo dog }
else if (%moo == cat) { echo -a moo cat }
else { echo -a moo mouse }
}

With Switch's....

alias moo {
var %moo = $1
switch(moo) {
case "cow":
echo -a moo cow
break
case "dog":
echo -a moo dog
break
case "cat":
echo -a moo cat
break
default:
echo -a moo mouse
break
}
}

this could be done using a variable, or direct switch($1) { } etc...

break is used to break out of the switch, so it doesnt check any further (as it doesnt need to, and it wont have any more).. however should NOT break out of the alias..

Last edited by Ghozer; 15/10/06 02:46 AM.