Code bug on lvl "Woodland Cleaver"

The clue is not in the cupcakes but in the error message. Your situation is similar to someone else’s right now, and Chronist Gilver has an explanation of the problem. Basically, you need to check whether there is an enemy before attacking; otherwise, your code tries to attack when there is no enemy and crashes.

Thank you for attempting to format your code correctly (while many do not at first and have to be asked to do so); however, for code, you highlight it and click the “</>” button, not the “quote” button (which is what I’m assuming you did).

One other thing: I’m pretty sure the “Bugs” tag is for problems in the game code. For problems in your own code, the post remains uncategorized (unless you are an adventurer or something).

Welcome to the CodeCombat forums! I wish you success in your endeavors!