Forest Fire Dancing feedback


#21

Please do not be impatient, but your problem is that you do not have anything to define else; You did code else, but you are not defining what else is for. Also, could you please paste your code to your post so it is easier for me to see?


#22

O.K. thx!!!


#23

while (true) {
var evilstone = hero.findNearestItem();
if (evilstone) {
if (evilstone.pos.x==34) {
hero.moveXY(46, 22);
} else {
hero.moveXY(46, 22);
}
hero.moveXY(40, 22);
} else {
hero.moveXY(40, 22);
}
hero.moveXY(34, 22);
} else {
hero.moveXY(34, 22);
}
}


#24

Oh, also read the FAQ to post your code correctly.


#25

For example,

while (true) {
var evilstone = hero.findNearestItem();
if (evilstone) {
if (evilstone.pos.x==34) {
hero.moveXY(46, 22);
} else {
hero.moveXY(46, 22);
}
hero.moveXY(40, 22);
} else {
hero.moveXY(40, 22);
}
hero.moveXY(34, 22);
} else {
hero.moveXY(34, 22);
}
}

just looks like you didn’t indent correctly.


#26

Where is the FAQs???


#27

In the top right corner, you will see three horizontal bars. Click on them, and you will see the FAQ with a new sign to the right of it.


#28

O.K. Thx!!!


#29

Looks like the “new” was taken off for me.


#30

I just tried your code. It did not work.


#31

:cry: Help!!!


#32

No, that was your code. I just used an example of what happens when you don’t read the FAQ and don’t know what to do.


#33

Oh. You are mean!!!


#34

BTW, I don’'t code JS


#35

But I can understand a little bit; I also code Java.


#36

Oh. Thx anyway. This is my last post due to the first day thing. I can still edit this post and tell you stuff.


#37

The problem with your code is that you need to define what else is for. If you keep saying that else of else, the code messes up.


#38

You need the "elif"s, BTW.


#39

Ok. I got it. (20 chars)


#40

Sorry for being impolite.:relaxed: