Hi ,I got a problem with pass this level [impas w mateczniku A ] , my hero has a little energy to win!
Everything with code seems to be ok
|690x431](upload://i773NssRNXhYJsGtL1TdQyYQfjj.jpeg)
please help
Hi ,I got a problem with pass this level [impas w mateczniku A ] , my hero has a little energy to win!
Everything with code seems to be ok
|690x431](upload://i773NssRNXhYJsGtL1TdQyYQfjj.jpeg)
please help
Hi , can anyone look at it, and help me?
thx a lot
Zambi, post a screenshot of your hero…showing what armor, weps, etc you have equipped. I see that you tried, but it appears that you saved the shot, then attempted to upload. Instead, if you don’t have Snip-it (comes with Windows), you can press the ‘print screen’ button, and then directly paste here, in this chat box.
hi I bought new armor and now everthing is ok
many thx to @dedreous
My equipment:
My code:
While(true) {
var enemy = hero.findNearestEnemy();
// Use an if-statement with isReady to check "cleave":
if hero.isReady("cleave")
// Cleave!
hero.cleave(enemy);
// Else, if cleave is not ready:
else {
hero.attack(enemy);
}
}
Gives me this error:
You didn’t wrap this with brackets for the if-statement
while(true) {
var enemy = hero.findNearestEnemy();
// Use an if-statement with isReady to check "cleave":
if (hero.isReady("cleave"));
// Cleave!
hero.cleave(enemy);
// Else, if cleave is not ready:
else {
hero.attack(enemy);
}
I now get this warning
You fixed one of the mistakes, but also, like you did for the else-statement, you should put the below in {}
else (hero.isReady("attack")); {
hero.attack(enemy);
}
Like this?
This also gives me an error though:
nooo, you shouldn’t do that, you should put the cleave statement in those {}, and return the else-statement to the way it was
Hint
if (hero.isReady("cleave") {
hero.cleave(enemy);
}
while(true) {
var enemy = hero.findNearestEnemy();
if (hero.isReady("cleave")) {
hero.cleave(enemy);
}
}
else {
hero.attack(enemy);
}
You should remove the bottom bracket and place it under the attack statement
All done! Thanks for your help!
Anytime
Just mark the post that helped you most as a solution, so that the topic will close
I didn’t make this topic, @Zambi25 did but didn’t close it
I used this topic to save me making another one. Sorry if it came across as necro
No, its fine
Maybe @Deadpool198 can close it?