Is this a glitch?


#1

i am doing backwoods brawl and this message keeps popping up

loop:
    enemy = self.findNearestEnemy()
    self.shield()
    if self.isReady("cleave"):
        self.cleave(enemy)
    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


#2

What message keeps popping up?


#3

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


#4

Are you sure that an enemy exist?


#5

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


#6

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.