ID:112147
 
Not a bug
BYOND Version:481
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 4.0
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
When using || some things just don't seem to work, it seems to apply to text strings and lists.

Numbered Steps to Reproduce Problem:
1.Make a list of 2 or more items.
2.Make an if( 1 item in list|| 2nd item in list) with something that comes after.
3.Notice it doesn't do whatever's after the if() even if one is true.

Code Snippet (if applicable) to Reproduce Problem:
Testing does not pop up in the game.
mob/Login()
var/blahblah = list("High","Low")
if("High" in blahblah||"Low" in blahblah)
src << "Testing!"
return



Expected Results:
"Testing!" as a message when logging in.

Actual Results:
No message is displayed when doing it the first way.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Every game
In other user accounts? No other accounts to try.
On other computers? Too much work.

When does the problem NOT occur?
Always occurs.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not sure, but I never had a problem with it before so I'd assume it's something with a more recent update. Although I can't say for certain that I've done this exact thing.

Workarounds:
Splitting them apart as such:
mob/Login()
var/blahblah = list("High","Low")
if("High" in blahblah)
src << "Testing!"
return
if("Low" in blahblah)
src << "Testing!"
return

or
mob/Login()
var/blahblah = list("High","Low")
if(("High" in blahblah)||("Low" in blahblah))
src << "Testing!"
return

it works just fine.

Edit: I did not know () around each one fixed it, however it seems a little redundant? So, possibly still a bug.