Help with mad maxer sells out

i think i did everything the level said, is there anything wrong?


Could you please provide your code, using the </> button in the message, and a screenshot of the problem (we can’t see it now)?

1 Like
# Coins here disappear after a few seconds!
# Get all the gold coins before they vanish.

hero.cast("haste", self)
# To grab the most gold quickly, just go after gold coins.

while True:
    coins = hero.findItems()
    coinIndex = 0
    # Wrap this into a loop that iterates over all coins.
    while coinIndex<len(coins):
        coin = coins[coinIndex]
        if coin.value == 3:
            # Only pick up gold coins.
            hero.moveXY(coin.pos.x, coin.pos.y)
        coinIndex +=1


i formatted it

In the level you should find the closest best coin, not just best coin.
That is why you can’t collect all the gold coins

1 Like

thank you so much😊 this is last level of desert that i am coding.


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