Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Short-sighted-Burl

Hi there!! :slight_smile:
I’m wriiting here because I got problem with Short-sighted-Burl level.

Can somebody look to my code and say what I did wrong

thx a lot :slight_smile:

Hi Zambi…for future posts, please post your code itself. This link will show you how: [Essentials] How To Post/Format Your Code Correctly

That being said, I am not very proficient in JS, but from what I can see, you have an errant space at line 25.

Switch to coding in Assembler. Trust me, that’s 100000% times easier.

function takeItem(item) {
    hero.moveXY(item.pos.x, item.pos.y);    // hero.moveXY(x, y);
}
function checkTakeRun(coin) {
    hero.moveXY(40, 12);
}
var item = hero.findNearestItem();
if (item) {
    hero.moveXY(x, y);
    takeItem(item);
}
// Nie zmieniaj tego kodu.
while (true) {
    hero.moveXY(16, 56);
    var coin = hero.findNearestItem();
    checkTakeRun(" Gold Coin");
    hero.moveXY(64, 56);
    coin = hero.findNearestItem();
    checkTakeRun("Gold Coin");
}
it's my code what I am doing wrong, please help me :)