I really don’t know what to do to solve this, can someone please help?
The error message says that moveXY requires 2 numbers, but you’re passing a string in.
Do you know the difference between a string and a number?
Don’t put quotes around variable names.
"Arrow tower" with
There is only one enemy in this level (the arrow tower), so the
enemy variable references the arrow tower.
We are making progress, don’t worry!
Your code is trying to access
y properties directly in the unit object, which don’t exist there. The
y properties belong to the unit’s
pos property. You need to change
enemy.pos.x, likewise for the
y property and the hero’s position properties as well.
Thankyou! It finally worked!
This confused me with arrow tower but when I put in enemy, it worked
Thankyou so much!
I struggled with my code on this level, but now I got it!