Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Seek-and-hide, had to add findNearestItem

It didn’t say to do this, but my code didn’t work, and looking over it, I found there was no findNearestItem. I think it would be good to fix that.

add findnearest item

Some levels give your hero special abilities, like in Ace of Coders or Capture the Flag they give you new methods. For example you can command your soldier to find the nearest enemy even though it is not a method

I’m not sure what you mean milton… Maybe CoCoCharlie will.
Anyway @CocoCharlie, this isn’t a bug, item is defined as an argument in the brackets of the function: checkTakeHide(item). You can use item like a variable inside the function.
What you need to do in the while True loop to make this work, is to put an item variable you’ve defined in the while True loop into the brackets of the function.
This teaches you how to use arguments, which can be very helpful. You can have no arguments and just define item inside the function, but it’s not a bug that they don’t have that in the starting code, because you can do it without doing that.
Danny