• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Code explanation

Explorer ,
Sep 06, 2020 Sep 06, 2020

Copy link to clipboard

Copied

I need explanation cuz I don't get this.
This || is or, and && is and, right?
so why if I use like this
if(PW1 == 0 && PS < 5){
PW2G.display = display.visible;
PW2B.display = display.hidden;}

it triggers on either PW1 or PS it doesn't matter which one.
Shouldn't it need both requirements to trigger?

And if I use with || it needs both requirement and it shouldn't, it would need PW1 or PS right?
it's like && and || changed roles or I'm not getting something here?

TOPICS
How to

Views

191

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 06, 2020 Sep 06, 2020

Copy link to clipboard

Copied

LATEST

Yes, that's correct, but what you're describing is impossible. There must be something else at hand here.

Can you post the full code, and/or share the actual file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines