SOLVED--Self.costOf error message


When I try to use self.costOf, I get this error message:

Is there a level that teaches this? I thought it was only necessary in Javascript or something. I’m using Python. :confounded:

Thanks much!


How are you calling self.costOf? It should be something like,

if >= self.costOf("archer"):


Here is the relevant code:

if enemy.type != "wizard" and enemy.type != "cage" and enemy.type != "yeti":
    value += self.costOf(enemy.type)

It has worked before elsewhere.

It’s on Zero Sum, so no other unsummonable enemy types should appear.


Pender’s type isn’t "wizard". It’s "sorcerer". I believe that is your problem.