- Home /
unexpected token: ApplyDamage
i wrote a piece of script and the system said unexpected token: ApplyDamage pls help this is driving me nuts my code in attachment: link text
my code.txt
(483 B)
Comment
Answer by robertbu · Apr 15, 2014 at 03:34 AM
In this line:
hit.transform.SendMessage("ApplyDamage"; thedamage, SendMessageOptions.DontRequireReceiver);
You need to replace the ';' after "ApplyDamage" with a ',', so it becomes:
hit.transform.SendMessage("ApplyDamage", thedamage, SendMessageOptions.DontRequireReceiver);
Note for future posts, please past your code into the question, select your code and use the 101/010 button to format it. Code in the question makes it more likely an answer will be provided, plus it provides line numbers to reference when answering a question.
Your answer