Here is my code but I still cannot complete it help!
while True:
coins = hero.findItems()
coinIndex = 0
# Wrap this into a loop that iterates over all coins.
while coinIndex < len(coins):
coin = coins[coinIndex]
# Gold coins are worth 3.
if coin.value == 3:
# Only pick up gold coins.
hero.moveXY(coin.pos.x, coin,pos,yy)
coinIndex += 1
pass
Welcome to the forum! This is a family-friendly place where coders can share bugs, ask for help on any CodeCombat level (don’t forget to post your code correctly), or just hang out with other coders. But before you proceed, please check out our guidelines: this topic.
Have a great time!
Can you please format your entire code? It’s easier to understand.