I'm trying to solve the level Shine Getter, but an infinitte loop error keeps popping up and Tharin won't move! Can any of you guys help me out on this? while True: coins = hero.findItems() coinIndex = 0 while coinIndex < len(coins): coin = coins[coinIndex] if coin.value == 3: hero.moveXY(coin.pos.x, coin.pos.y) pass
Try putting an if statement in front of the if coin.value == 3 because you’re not checking if there’s a coin before you’re checking it’s value.
Hope this helps
This is what appeared:
To exit from a loop you need to increment its index.
Thanks, I needed that!