So, I have this script that I had, but then began modifying. Since it was in C# (it was originally not mine, I just used it to start off(I'm mostly new to Unity, and development in general, although I have worked much with 2D before and have very quickly familiarized scripting syntax)), I had a bit of trouble adding my own spread modifier. I chose to convert it to UnityScript, so that I would be able to more quickly do things with it. I haven't been able to test it, but I can work all translating kinks out after I fix this. I'm on the very end:
But when it compiles in Unity, the only error is this: Assets/My Assets/Scripts/Gun.js(509,34): BCE0043: Unexpected token: ..
Line 509 being "function ShowHits(RaycastHit.hit)", the problem is the period between RaycastHit and hit, but there shouldn't be. There were no problems with other instances of RaycastHit.hit and RaycastHit.hits in the script, so, considering this just bewildered me, does anyone know what's going on here? (I have looked and looked around, not finding an answer, so don't flame me if I'm blind)
You need to define the type of variables used in functions.
answered Apr 24 '11 at 04:44 AM