I can’t understand why this code wouldn’t work. It says that it expects an identifier instead of the last “else”.
Seems to me if in the first ‘if(enemy)’ statement was not true, that it would skip directly to the last else statement and move the hero back to location 40, 34.
I see what you are saying though. This is my biggest problem is keeping up with all these brackets. Looks like I didn’t have one to close out the ‘if enemy’ statement. Are lack of these brackets be why it was giving me the original error message?
You can edit your post and put in 3 backstick before and after the code still or highlight everything and click the button </> which is in the top bar of the text editior.