[Solved] Need Help With Paldins!

So, Right Now I’m On Summits Gate And I’m Trying To Make My Paldins Heal Me, but unlike Grim Determination My Paldins Aren’t Healing me!! Below Is My Code, At The Far Bottom Is The Paldin Code:

// Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.
while(true) {
    var enemy = hero.findNearestEnemy();
    if (enemy) {
        hero.attack(enemy);
    }
    var flag = hero.findFlag();
    if (flag) {
        hero.moveXY(flag.pos.x, flag.pos.y);
        hero.pickUpFlag(flag);
    }
    if (hero.isReady("heal")) {
        hero.heal(hero);
    }
    if (hero.isReady("throw")) {
        hero.throw(enemy);
    }
    if (hero.gold > 20) {
        hero.summon("soldier");
    }
    var friend = hero.findFriends();
    for(var i = 0; i < friend.length; i++){
        hero.command(friend[i], "attack", enemy);
    }
    var paldin = hero.findByType("paldin");
    if (paldin) {
        for(var o = 0; o < paldin.length; o++){
        hero.command(paldin[o], "cast","heal", hero);    }
    }
}

Help me Please! I keep Dieing At The 3rd Gate Because Of This!

1 Like

What boss star do you use?

3 Likes

I used Boss Star 3! But It Wont work

1 Like

You forgot to indent and forgot the a in paladin.
I guess thats it. Tell me if you still can’t solve it. I’ll try my best.

var paldin = hero.findByType("paldin");
    if (paldin) {
        //indent!
        for(var o = 0; o < paldin.length; o++){
        //indent here too
        hero.command(paldin[o], "cast","heal", hero);    }
3 Likes

Sadly It Wont Work @Chaboi_3000

1 Like

Did you indent the other places too?

1 Like

Never Mind. Its Working! Thank You!

1 Like

your welcome!!! :smiley::smiley::smiley:

1 Like

Again Thank You! I Just Beat The Level because Of Your Help!!! :wink:

2 Likes