That FN Ninja
Member
I'm running Windows XP SP2, Java 1.6.0_11, and KoLmafia v13.3.1
So I've been trying to clean up a script I've been working on, but I think I'm using the switch case commands wrong. I'm trying to change this:
to switch case. I tried this:
but that's not working. I just learned about switch case so I'm not sure I'm getting the syntax right???
So I've been trying to clean up a script I've been working on, but I think I'm using the switch case commands wrong. I'm trying to change this:
Code:
boolean stop=false;
if(item_amount($item[Asbestos ore]) < Asbestos || item_amount($item[Chrome ore]) < Chrome || item_amount($item[Linoleum ore]) < Linoleum || item_amount($item[lump of diamond]) < Diamond || item_amount($item[stone of eXtreme power]) < stonepower || item_amount($item[meat stack]) < meatstacks)
{
(outfit ("Mining Gear") );
if(varwall <= 54 && varwall >= 9)
{cli_execute("mining.php?mine=1&which="+int_to_string(varwall)+"&pwd");}
}
else
{
print ("Miner, miner, you're quite the miner!", "blue");
stop=true;
}
to switch case. I tried this:
Code:
boolean stop=false;
if(!stop)
{
switch
{
case item_amount($item[Asbestos ore]) < Asbestos:
case item_amount($item[Chrome ore]) < Chrome:
case item_amount($item[Linoleum ore]) < Linoleum:
case item_amount($item[lump of diamond]) < Diamond:
case item_amount($item[stone of eXtreme power]) < stonepower:
case item_amount($item[meat stack]) < meatstack:
case item_amount($item[bubblewrap ore]) < Bubblewrap:
case item_amount($item[cardboard ore]) < Cardboard:
case item_amount($item[styrofoam ore]) < Styrofoam:
if(have_outfit("Dwarvish War Uniform"))
(outfit ("Dwarvish War Uniform") );
else
{(outfit ("Mining Gear") );}
if(varwall <= 54 && varwall >= 9)
{cli_execute("mining.php?mine="+int_to_string(mine)+"&which="+int_to_string(varwall)+"&pwd");}
}
}
else
{
print ("Miner, miner, you're quite the miner!", "blue");
stop=true;
}
but that's not working. I just learned about switch case so I'm not sure I'm getting the syntax right???