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 :)

umm please help for some reason the item.pos.x or item.pos.y isnt working
here is my code:

Collect coins and run, or else the burl will find you.

This function allows your hero take an item.

def takeItem(item):
hero.moveXY(coin.)

Write the function “checkTakeRun” with one parameter.

If the item exists, use “takeItem” function to take it.

Go back to the start (green mark), with or without the item.

def checkTakeRun(item):
takeItem(item)
hero.moveXY(40, 12)

Don’t change this code.

while True:
hero.moveXY(16, 56)
coin = hero.findNearestItem()
checkTakeRun(coin)
hero.moveXY(64, 56)
coin = hero.findNearestItem()
checkTakeRun(coin)