Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED] Brittle Morale(help)


#1

Here is my code. What’s wrong?


#2

Please explain more about what is happening when you run your code. Please send a screenshot of the whole page also. Not just the code. Also any errors that come up would be helpful.

-@Luke10


#3

Thank you for replying.
Here is the whole page.


#4

I believe your issue is that you did not define enemy.health on line 10 which is enemy.health = strongestHealth


#5

Thank you for replying.
How do I have to define it?
I don’t know that.


#6

So in your code, you know how you defined strongestHealth to be zero and enemyIndex to be zero. You need to figure out what enemy.health should be defined to and the define it. That should work. If you need any more help. Feel free to continue posting on this topic or directly message me! I will be happy to help :smile:


#7

It works!
Thank you!


#8

You are welcome! As I said feel free to dm me if you need help with any other levels

-@Luke10