Here is my code. What’s wrong?
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.
I believe your issue is that you did not define enemy.health
on line 10 which is enemy.health = strongestHealth
Thank you for replying.
How do I have to define it?
I don’t know that.
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
It works!
Thank you!
You are welcome! As I said feel free to dm me if you need help with any other levels
Oh, wait i figured it out, i was writing the enemyIndex variable wrong…