Ice Hunter - 4 Yaks problem

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

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

enemyName = enemy.id
hero.say(enemyName)

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

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

1 Like

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

Post full code please. Including the function.

https://pastebin.com/af3BPrEH

1 Like

Attack enemy instead of enemyName

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

1 Like

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

I tried it. It didn’t work.

1 Like

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

1 Like

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

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.

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

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.

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

1 Like

I even restarted the level too.

1 Like

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