I got this error message: Unhandled error: Type error: Cannot read properties of undefined ('reading isVector')
on Sarven Siege. The error occurs when I summon a griffin-rider
, but there is no given line for the error. I don’t even know what it means. I’ll attach the code for the griffins:
const towers = hero.findByType("arrow-tower")
let i = 0;
...
if (hero.findEnemies().length) {
if (hero.gold > hero.costOf("griffin-rider")) {
hero.summon("griffin-rider");
hero.command(hero.built[hero.built.length - 1], "defend", towers[i]);
if (i < towers.length) {i = i + 1;}
else {i = 0;}
}
}
This might not be the portion of the code that has an error, but I think it is. What does the error mean? Is there a problem with my code that I just don’t see?