my code is the exact same as on all other topics that needed help with this level, but my code is still collecting the mushrooms and the poison. Can someone pls tell me what to do?
hello and welcome to the codecombat discourse, @Meghna_Guntupalli!
if you haven’t already, check out the rules here: https://discourse.codecombat.com/t/welcome-to-codecombat-discourse-forums/1560
In your code if enemy and enemy.type == "thrower" or "munchkin"
the compiler is reading it as if enemy and enemy.type == "thrower"
OR "munchkin" as a seperate condition
“munchkin” ofc does not detect whether there is an enemy and if its type is “munchkin”
you’ll need to do “enemy and enemy.type == munchkin” instead.
Same thing with “coin”
1 Like
