Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Is this a glitch?


i am doing backwoods brawl and this message keeps popping up

    enemy = self.findNearestEnemy()
    if self.isReady("cleave"):
    if self.isReady("chain-lightning"):
        self.cast("chain-lightning", enemy)

but this works perfectly fine in the cavern
i equipped the same gear and things and it does not work i copy and pasted the copde

also i get less gems and xp than i used to for the brawls every time i go up


What message keeps popping up?


cast’s argument target should have type object, but got null, You need something to cast upon


Are you sure that an enemy exist?


yup they always exist and it works fine in the cavern brawl


Looks like not. Maybe your hero don’t see an enemy (obstacles, distance). It’s a good practice always check the existance before do something.