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

Ice Hunter - 4 Yaks problem

#1

I made the hero call the enemies name and got this list

Yeti 1
Nakos
Abos
Bogus
Dboss
Yakus
Drabos

The mission states that they are 4 yaks with the substring "bos"
However, my hero only kills three and calls out three yaks with the substring “bos”

1 Like
#2

What is your code? Post your code in case there are any issues. :slightly_smiling_face:

#3
enemyName = enemy.id
hero.say(enemyName)

if isSubstring(enemyName,"bos"):
    # Then defeat it.
    while enemy.health > 0:
        hero.attack(enemyName)
1 Like
#4

The rest is the function that was given and I didn’t touch it.

1 Like
#5

Substring “bos”, not "Bo"
Do not attack enemyName, instead attack enemy.

#6

Post full code please. Including the function.

#7

https://pastebin.com/af3BPrEH

1 Like
#8

Attack enemy instead of enemyName

#9

I still got the same error. I got the hero to call the names and he gave the list above.

1 Like
#10

Maybe do not have the hero call out the names, just attack.

#11

I tried it. It didn’t work.

1 Like
#12

Hmm, strange. Could you send a screenshot? Your code looks okay.

#13

1 Like
#14

It looks perfectly fine. I don’t get how it doesn’t work.
I’ll test your code and see if there are issues.
Brb

#15

I tested your code and it works perfectly. Do you have a quicker sword, maybe? I have the Sword of the Forgotten and it works with your code. Long Sword might be too slow and it doesn’t do sufficient damage.

#16

The last 30 seconds he just stands there. I don’t think it’s the sword’s problem. It’s a weird bug on my end probably.

1 Like
#17

First try to clean your cache. If that stops the bug but you still can’t pass the level, try to equip yourself with a better sword.

#18

I got the sword of darkness and cleared my cache. Code still failed.

1 Like
#19

I even restarted the level too.

1 Like
#20

What happens? Is the bug still there or are you just unable to beat the level?