Kithard Brawl - Advanced Python Feature Parsing


I am trying to complete the level Kithard Brawl. The goal of the challenge is to survive for 40s. Since I came back to this level and have much better gear I decide to use a simple battle code:
enemy = self.findNearestEnemy()
if enemy:
if ready = self.isReady(“cleave”):
However when I attempted to run the same code that I use on many levels I get this error message:
Fix Your Code

Possibly a bug with advanced Python feature Parsing

unknown expression type: Variable Declation


The problem is this line:

if ready = self.isReady("cleave"):

It is doing an assignment inside a conditional statement, which is not currently supported in CodeCombat (and completely unnecessary in your particular case). Remove the ready = part and it should work:

if self.isReady("cleave"):


Oh thank you. I was only looking at the only variable I thought I was using (the enemy variable). I actually get that bug a lot and now I know why. There must be an error with the autofiller because that’s what I use to write the code.


Oh, that seems odd. I just tried the autocomplete, and it seems to work fine.

Note that the autocomplete works differently when you are inside a conditional statement. That is, if you use the “isReady” autocomplete outside of an if statement then it expands to ready = self.isReady("cleave"), but if you type if and immediately after it use the “isReady” autocomplete it will expand to self.isReady("cleave"), without the assignment part.