Other spell not spell error [Solved]


// Defeat as many ogres as you can.
// Use 'cast' and 'canCast' for spells.

while(true) {
    var enemy = hero.findNearestEnemy();
    if (enemy) {
    if (hero.canCast("chain-Lightning")) {
        hero.cast("chain-lightning", enemy);
    if (hero.canCast("regen")) {
        hero.cast("regen", hero);

CodeCombat - Coding games to learn Python and JavaScript

I keep getting the error on line 9, I don’t get the error with any of the other spells either

The capital “L” needs to be lowercase.

oh silly me

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.