The code I use says “Cannot Read Property ‘Start’ of Undefined”. What do I do?
# Collect 25 gold, and then tell Naria the total. # Use break to stop collecting when totalGold >= 25. totalGold = 0 while True: coin = hero.findItems for 'coin' in 'line-of-sight': # Pick up the coin. hero.moveXY(coin.pos.x, coin.pos.y) # Add the coin's value to totalGold. (See the guide for more.) # Get its value with: coin.value totalGold += coin.value pass if totalGold >= 25: # >= means totalGold is greater than or equal to 25. # This breaks out of the loop to run code at the bottom. break # Done collecting gold! hero.moveXY(58, 33) # Go to Naria and say how much gold you collected. hero.say("I collected" + totalGold +" Gold")