Author Topic: Switches and cases  (Read 1326 times)

What port said, or if you really want to use a switch you could try something like this
Code: [Select]
%var = %color SPC %colorfx SPC %shapeFX;
switch$(%var)
{
case "1 3 4": //random numbers to demonstrate

case "2 4 2":
}

What port said, or if you really want to use a switch you could try something like this
Code: [Select]
%var = %color SPC %colorfx SPC %shapeFX;
switch$(%var)
{
case "1 3 4": //random numbers to demonstrate

case "2 4 2":
}
this is a good idea, but it's too... defined for his purposes.

I think.

if ( %color == 0 && %color_fx == 2 && %shape_fx == 1 )
{
    code block
}

if ( %color == 18 && %color_fx == 6 && %shape_fx == 0 )
{
    code block
}

Thanks, I'll do it like that.

it does, tested it earlier.

function blegh(%dafuq)
{
switch$(%dafuq)
{
case "dafuq" or "something entirely different":
OBJECTION!();
default:
echo("herpy derpy derp");
}
}

will work just fine (as long as you don't include the bbcode or the exclamation point)
That's damn cool, I wonder if you can use other words, maybey and, xor possibly? I can't really test this on my own right now lol.