Magma Mountain help pls

const gridSize = {rows: Math.max(hero.getLavaMap().length, hero.getLavaMap()[0].length), cols: Math.min(hero.getLavaMap().length, hero.getLavaMap()[0].length)};
Math.mod = (n, m) => n - m * Math.floor(n / m);
hero.setDir = d => {
    hero.dir = d;
    switch (d) {
        case 0:
            return hero.moveUp();
        case 1:
            return hero.moveRight();
        case 2:
            return hero.moveDown();
        case 3:
            return hero.moveLeft();
    }
}
hero.waitUntil = (t, n) => {
    while (true) if (hero.getRowAndCol()[t] === n) break;
}
hero.getRowAndCol = (x, y, array) => (array ? [(x ? x : hero.x) * 0.5 - 1.5, (y ? y : hero.y) * 0.5 - 1.5] : {row: (x ? x : hero.x) * 0.5 - 1.5, col: (y ? y : hero.y) * 0.5 - 1.5})
hero.navigateTo = (row, col) => {
    let pos = hero.getRowAndCol();
    if (pos.row !== row) {
        let n = pos.row < row ? 2 : 0;
        hero.setDir(Math.abs(pos.row - row) > gridSize.rows * 0.5 ? Math.abs(n - 2) : n);
    }
    hero.waitUntil('row', row);
    if (pos.col !== col) {
        let n = pos.col < col ? 3 : 1;
        hero.setDir(Math.abs(pos.col - col) > gridSize.cols * 0.5 ? Math.abs(n - 2) : n);
    }
    hero.waitUntil('col', col);
}
hero.left = () => (hero.setDir(Math.mod(hero.dir - 1, 4)));
hero.right = () => (hero.setDir(Math.mod(hero.dir + 1, 4)));
hero.navigateTo(1, 1);

hero.navigateTo isn’t working for whatever reason, idk why…

Hey, moonwatcher, sorry mabye i can not help but i will try my best, can you give me the screen shot?

Is it returning an error? If so what does it say?

No, just not working.

Screenshot for what? lol

Error or what?
(20 chars)

It just don’t move???

It just goes up and then nothing

I have an idea of what’s wrong… lemme see

This may help:

Sorry if I used it wrong I don’t usually use that function

He used javascript, you used python, a bit different mabye

I defined it lol, so there is a method

Yes, in Python you can’t give the hero extra methods without some difficulties

Ok, let’s see if what I just did fixes it

Oh, yeah. Sorry.

As someone who doesn’t know anything about JS…

Ight imma head out

Me, who couldn’t be bothered to make a meme

I need some help with simulating games tho, if you guys are finished…

Nope, didn’t fix :<

:< Um…

Oh, try putting something in the code so you know if things are even starting. Fire, dash, etc. (You of all people should know what etc means xd)

If those things happen, move them further into the method.
Maybe it’s an if loop that’s never being activated because the condition is always false.

My brain is tired owo how did I not think of that, I’ve done it so many times lol

yo in the magma mountain, I see opponents just jumping over my fire action every time I shoot at them, how can I do the same thing? Like please tell me the code