# [SOLVED] Could you help me on logical path

``````hero.moveXY(14, 24)
secretA = hero.findNearestFriend().getSecretA()
secretB = hero.findNearestFriend().getSecretB()
secretC = secretA and secretB
if secretC:
hero.moveXY(20, 33)
else:
hero.moveXY(20, 15)
hero.moveXY(26, 24)
if secretA or secretB == "true":
hero.moveXY(32, 33)
else:
hero.moveXY(32, 15)
if secretA and secretB == "true":
hero.moveXY(38, 24)
if secretB != "true":
hero.moveXY(44, 33)
else:
hero.moveXY(44, 15)
if secretB != "true":
hero.moveXY(50, 24)
``````

this is my code

The problem is that youâ€™ve used â€śtrueâ€ť instead of True (capital T).
You should be able to finish the rest. (remember to move back to the middle)
Danny

but it still does not work any other help?
I still die.

I reset It to try the thing again

ok this is my code

``````hero.moveXY(14, 24)
secretA = hero.findNearestFriend().getSecretA()
secretB = hero.findNearestFriend().getSecretB()

# If BOTH secretA and secretB are true, take the high path; otherwise, take the low path.
secretC = secretA and secretB
if secretC:
hero.moveXY(20, 33)
else:
hero.moveXY(20, 15)
hero.moveXY(26, 24)

# If EITHER secretA or secretB is true, take the high path.
secretD = secretA or secretB
if secretD:
hero.moveXY(32, 33)
hero.moveXY(38, 24)
# If secretB is NOT true, take the high path.
if secretB != "true":
hero.moveXY(44, 33)
else:
hero.moveXY(44, 15)
hero.moveXY(50, 24)
``````

Itâ€™s the same as what I just said. If you change that you get success.

1 Like

yea but I still die no matter what

Can you post your current code and screenshot of both your equipment, and of your level screen.

what do you mean be level screen

Hey Zijun, Boolean Values like ` True` or `False` are supposed to be written in Upper-case without `" "` instead of `"true"` or `"false"` (they are not strings):

Try it that way and hopefully youâ€™ll get whatâ€™s wrong.

Try to upload the picture here in your text editor, click and then select it from your PC.
Currently, itâ€™s in your local storage and nobody can view it.

I think he means to capture a screenshot of your game (the level you are stuck in)

1 Like

ok I understand thank you.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.