It
appears like you typed it in correctly, but I just pasted it in to a mostly clean project myself, and can't reproduce the error you're getting. The fact that it's asking for a "then", semicolon, or new line makes me think that you somehow entered an incorrect line break.
- Comment out those lines (add a # sign at the beginning of each line) and try again. If the bug still happens, my code is not what is causing the error. If the bug disappears, these new lines have somehow caused this error. Remember to restore the lines by removing the # sign before proceeding...
- Try deleting and manually re-typing it. Preferably, do the same with the lines above and below, too. If that doesn't work, delete it and paste it directly from what I entered above.
- Check to make sure you don't have any other scripts that alias or overwrite this method.
- Play around and see if it always happens or only under certain conditions (like an attack where the damage would be increased to 1), and let me know when it does and doesn't happen.
Anyone have any other ideas? This is definitely a strange error.