Keen_Do
1
I don’t know what is wrong but
it says that it cannot read property ‘start’ of undefined
here is my code
def onSpawn (event):
potion = pet.findNearestByType(“potion”)
pet.fetch(potion)
gold-key = pet.findNearestByType(“gold-Key”)
pet.fetch(gold-key)
pass
skeleton = pet.findNearestByType(“skeleton”)
pet.on(“spawn”, onSpawn)
while True:
if skeleton.health > 0:
hero.attack(skeleton)
else:
hero.moveXY(31, 38)
Try looking at the hints section it was a huge help when i tried it
what language are you using
on js def = var. its python
Keen_Do
6
I’m using the code language python
which line exactly does it say is wong or undefined
def onSpawn (event):
potion = pet.findNearestByType("potion")
if potion:
pet.fetch(potion)
key = pet.findNearestByType("gold-key")
if key:
pet.fetch(key)
pass
skeleton = pet.findNearestByType(“skeleton”)
pet.on(“spawn”, onSpawn)
while True:
if skeleton.health > 0:
hero.attack(skeleton)
else:
hero.moveXY(31, 38)
its my code. and he work.
Keen_Do
11
it show none of the lines wrong or undefined
you are welcome. goodl ukcon the next level
Bryukh
15
gold-key
– how do you think it’s one or two variables names? 
1 Like
It won’t let me start, saying I need the pets when I already own them.
Luke10
18
Have you equipped your pets?
1 Like
I own them but it says to subscribe to unlock in the loadout page
Then you do not have a pet. You must be subscribed to beat the level Dread Door, to unlock the Wolf Pet.
1 Like