[SOLVED] Passing Through... Why does ma code nota work?

Hi!
How do I solve Passing Through? Is my code okay?`while True:
item = hero.findNearestItem()
if item:
# If item.type IS NOT EQUAL TO “gem”
if item.type != “gem”:
# Then follow your pet wolf.
hero.moveXY(pet.pos.x, pet.pos.y)
else item and item.type == “gem”:
hero.moveXY("gem.pos.x, “gem”.pos.y)

        # Move to the gem's position.

https://codecombat.com/play/level/passing-through?

`

Can you format properly please ?

Wait, solved it!
Thanks for looking at my post… I’m new on this discourse…
any tips?
thnx again!

Wait you solve the post or the level? If you are done the level write [SOLVED] in your title. Or if you think that you have correctly fix your post you can look at this tutorial [Essentials] How To Post/Format Your Code Correctly