I can’t find what I’m doing wrong. Sometimes there was written that item = pet.findNearestItem() is written wrong, that I should type in pet.findNearestItem()… which was written the same. Only without the () there is no error, but it still doesn’t work. What do I need to change? Help
Just add the () back
you added “pass” too early.
item = pet.findNearestByType("item") or
potion = pet.findNearestByType("potion")
Move to the right.
Complete this function:
# Inside a while-true while True:
# Use hero.findNearestItem() item = hero.findNearestItem() # If there's an item: if item: # Use pet.fetch(item) to fetch the item. pet.fetch(item)
Use pet.on() to assign onSpawn to the “spawn” event
pet.on(“spawn” , onSpawn)
This is my code in python
Briana, do you need help with this level? If so, please post your code, properly formatted. This link will show you how: [Essentials] How To Post/Format Your Code Correctly
It worked for me!!!