Hi again, I’m having trouble with this level and I checked other posts but am still having the same issue.

Hero is not moving.

Here is my code:

```
while True:
closestGold = None
minGoldDist = 9001
coinIndex = 0
coins = hero.findItems()
if coinIndex < len(coins):
coin = coins[coinIndex]
if coin:
distance = hero.distanceTo(coin)
if coin.value == 3 and distance < minGoldDist:
closestGold = coin
minGoldDist = distance
if closestGold:
hero.moveXY(closestGold.pos.x, closestGold.pos.y)
coinIndex += 1
```