Library Tactitian: probable bug (Javascript)


#1

I am stuck with the library tactitian level. I have completed the requested lines of code, tried to run and I am getting an error message:

Line 11: Defend takes no arguments. Must defend a target or an {x,y} position.

The line, however, conatins predefined code, unmodified be me:

    hero.command(soldier, "defend", defendPos);

for reference, the full predefined function is

function commandSoldier(soldier, soldierIndex, numSoldiers) {
    var angle = Math.PI * 2 * soldierIndex / numSoldiers;
    var defendPos = {x: 41, y: 40};
    defendPos.x += 10 * Math.cos(angle);
    defendPos.y += 10 * Math.sin(angle);
    hero.command(soldier, "defend", defendPos);
}

I guess this is a bug, however I would like to check before submitting to GitHub.


#2

It may have something to do with your inventory. What kind of boots are you using?


#3

The Boots of Leaping - the most expensive ones available for not-subscriptors.


#4

Ok…are you sure you’re using the right methods to use them?


#5

I apologize - I don’t understand: To use what? The boots? The boots do not provide a “defend” method, nor does any other available part of my equipment.

The code was not written by me, the whole function is predefined by the system and not intended to be modified…


#6

Oh…ok this may be a bug. I’ll invite @Bryukh


#7

For a strange reason I am able to run the code today


#8

Is it working now? Or were you not able to run it in the first place?


#9

Yes, it is working well.


#10

Oh…ok glad to here it!:smile:


#11

Sorry, I’m on the travel now and can’t answer quickly :frowning:


#12

Its ok. I think the problem may be cleared up.:smile: