Hi there!!
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
Hi there!!
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
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:
def takeItem(item):
hero.moveXY(coin.)
def checkTakeRun(item):
takeItem(item)
hero.moveXY(40, 12)
while True:
hero.moveXY(16, 56)
coin = hero.findNearestItem()
checkTakeRun(coin)
hero.moveXY(64, 56)
coin = hero.findNearestItem()
checkTakeRun(coin)