ID:145758
 
Code:
                        switch(usr.Feud_Resolve_L)
if(0||1)
src << Speak("I don't want to talk! That Fijj is a big meanie!")
usr.Feud_Resolve_L = 1
else if(2||3)
src << Speak("Fijj wants an apology? Well he's not getting one until he gives me my favorite <B>rock</B> back!")
usr.Feud_Resolve_L = 3


Problem description:

When I use switch(), and have if(something) followed by else if(something||something), it goes to the else if(), even though it should be picking the first if(). This never happens if I do if(variable == something), etc. and forgo the switch(). What am I doing wrong?

|| and && don't work the same in a switch() as they do in a normal conditional. You can use commas and the 'to' operator:
switch(something)
if(0,1)
// Do something
if(2,3)
// Do someting else
if(4 to 6)
// Do something else
else
// All failed.
In response to Nadrew
Brilliant. My only regret is not knowing about this sooner!