There’s a few issues here with your code. First, you’ve not defined coins. Also, inside the while coinIndex < len(coins): loop, you’ve not defined coin properly. Third, you tell the hero to moveXY to coin position coordinates, but then follow with an if conditional statement and tell the hero to moveXY if the coin.value == 3. There should only be one move statement in this code (the second one is correct). Lastly, the coinIndex should be incremented at the end.