This was my program:
move to the right.
hero.moveXY(76, 35)
complete this function:
def onSpawn(event):
pass
# Inside a while-true 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)
When I run it, the pet says it can’t get to the potions and my hero dies off. Tried watching youtube videos but it said the same thing.