Weird moving of the hero

I cant understand what`s wrong with my hero moving code?

loop {
    //  Find coins and/or attack the enemy.
    // Use flags and your special moves to win!
    var items = this.findItems();    

    for (var a = 0; a < items.length; ++a) {
        var enemy = this.findEnemies();  
        if (enemy.length > 0) {
            for (var i = 0; i < enemy.length; ++i) {
                var enemy1 = enemy[i];
        } else {
            var item = items[a];
            this.move({x: item.pos.x, y: item.pos.y});

You need to be more descriptive. What is your hero doing?

It’s the “move” method. it’s currently bugged. i recommend switching back to boots with moveXY

This is a "multiplayer treasure grove"
My hero should collect coins and kill all enemies.

He meant describe what was wrong with your heros movement. nonetheless i already gave you the answer. :slight_smile: