Web Development 2 | Animania Help

Hello,
so im trying to pass the level on Web Development 2.
My code looks like this:

http://pastebin.com/DSY8ms8K

I dont get what I’m doing wrong.
I’ve added properties to the animation but it still say’s incomplete.

Here is the webpage to the result (i know it looks horrible but it’s just an example^^):

I’d be happy if someone could help me with that.

Cheers

I copy paste your code and it completes the goal for me.

What Internet browser do you use? Can you email us at team@codecombat.com so we can look into your session?

I am currently using Firefox.

I’m pretty sure it has to do with the way I’m detecting changes to the player’s CSS code.

Chome works fine if you absolutely must play it, otherwise the next level after that is: http://direct.codecombat.com/play/level/precision-coloring

I’ll be looking into a fix over the next few days, thanks Hubit.

Thanks a lot!
It worked in Chrome so yeah.
Thank you very much for your help!

I can not find the problem.

// This shows how to define a function called cleaveWhenClose
// The function defines a parameter called target
function cleaveWhenClose(target) {
if (hero.distanceTo(target) < 5) {
// Put your attack code here
// If cleave is ready, then cleave target
if (target) {
hero.cleave(target);
} // else, just attack target!
}else {
hero.attack(target);
}
}

// This code is not part of the function.
while (true) {
var enemy = hero.findNearestEnemy();
if (enemy) {
// Note that inside cleaveWhenClose, we refer to the enemy as target.
cleaveWhenClose(enemy);
}
}

Hi @Buddy_Dector, welcome to the CodeCombat discourse! :tada:
If you post your code on the forum please make sure it’s formatted. Read this topic to learn how to format your code:
[Essentials] How To Post/Format Your Code Correctly
Then I’ll be able to read your code and help you.
Danny