|
I have a script that isn't working properly. It says on line 6: Assets/FPSScripts/MouseLook.js(7,24): BCE0043: Unexpected token: =. and on line 7: Assets/FPSScripts/MouseLook.js(7,25): UCE0001: ';' expected. Insert a semicolon at the end. I see what it is saying, but I don't see my problem. Here is the script. public enum RotationAxis {MouseX = 0, MouseY = 1} var RotationAxisRotationXY = RotationAxis.MouseX || RotationAxis.MouseY; var sensitivityX : float = 400f; var minimumX : = -360f; //This is line 6! var maximumX : = 360f; //Line 7 here. var RotationX : float = 0f; var OriginalRotation : Quaternion; var RotationY : float = 0f; var minimumY : float = -360f; var maximumY : float = 360f; var sensitivityY : float = 400f; function Update () { if(RotationAxisRotationXY == RotationAxis.MouseX) { RotationX += Input.GetAxis("Mouse X") * sensitivityX * Time.deltaTime; OriginalRotation = XQuaternion = Quaternion.AngleAxis (RotationX , Vector3.up); transform.localRotation = OriginalRotation * xQuaternion; } }
(comments are locked)
|
You had two :'s where they didn't belong. I guess you were trying to define it as a float, but missed the float part.
(comments are locked)
|

Format code when posting please. Also don't post comments as answers.