Some info on how to use the + operator is needed to complete this level.
My first problem was that I couldn’t stop collecting coins after I reached 25.
At first, I wasn’t sure what to do with “coin.value”. I ended up using: totalGold = coin.value, which just made me pick up all the coins. After reading another post on this level, I changed it to totalGold = totalGold + coin.value (or totalGold += coin.value). That did the trick, but how would someone with no coding experience know to do that? In hindsight, the 3rd and 4th hints made a lot more sense, but could have been clearer. Perhaps:
// Pick up (coins) and add (their) value to (totalGold).
// Get (each coin’s) value with: coin.value
My second problem was that I couldn’t tell Naria how much gold I’d collected.
I used: this.say(“I have " totalGold " gold”); I found out I had to use “+” as a concatenate operator. I changed it to: this.say(“I have " + totalGold + " gold”); Now all my code works, I just wish I didn’t have seek outside help to make it happen.
I really enjoy Code Combat and even convinced my wife to start playing (so I can crush her in multiplayer). However, she hit the same brick wall I did on this level and hasn’t played in over a week now. My hope in writing this is to get the hints and help/guide updated so that other beginners can get through this level (my kids haven’t got to this one yet)
p.s. This is the first forum I’ve actually joined. not sure how/if I should categorize this… scribe?, .