ID:149261
 
It's not really much of a problem, but I'm kinda curious.
I thought of doing this to save some some space on my parser, but if I do something like
    switch(C2)
if("s"||"south") src.South()
// if("south") src.South()

It'll recognize the S, but not South. With if("s"|"south" it doesn't recognize either one of them.

Like I said, no big deal, just wondering why it doesn't do it.
Try using this format instead:

if("blah1","blah2") //do this.
In response to Foomer
Ahh, okay. I think I understand. the answer of the question on why it doesn't work would be because it's not the same as a normal if statement when it's under switch, it's more like a list or something, huh? Thanks, wasn't really looking for an alternate method (but that did help a ton!), was just wondering why. :)


*refrains from hugging or saluting*
In response to Zagreus
Yes, because switch statement if's are goofy.