- Home /
 
 
               Question by 
               Coderman915 · Jul 28, 2014 at 09:17 PM · 
                error message  
              
 
              Im having trouble with this code.
using UnityEngine; using System.Collections;
public class FpController : MonoBehaviour {
 public float movementSpeed = 5.0f;
 public float mouseSensitivity = 5.0f;
 public float UpDownRange = 60.0f
 // Use this for initialization
 void Start () {
 
 }
 
 // Update is called once per frame
 void Update () {
     //Rotation
     float rotLeftRight = Input.GetAxis("Mouse X") * mouseSensitivity; 
     transform.Rotate(0, rotLeftRight, 0);
     float rotUpDown = Input.GetAxis("Mouse Y") * mouseSensitivity; 
     float currentUpDown = Camera.main.transform.Rotate.eulerAnglea.x;
     float desiredUpDown = currentUpDown - rotUpDown;
     Camera.main.transform.Rotate = Quaternion.Euler( desiredUpDown, 0, 0);
     //Movement
     float forwardSpeed = Input.GetAxis("Vertical") * movementSpeed;
     float sideSpeed = Input.GetAxis("Horizontal") * movementSpeed;
     Vector3 Speed = new Vector3 (sideSpeed, 0, forwardSpeed);
     Speed = transform.rotation * Speed;
     CharacterController cc = GetComponent<CharacterController>();
     cc.SimpleMove (speed); 
 }
 
               } It says i have an unexpected symbol in void?
               Comment
              
 
               
              Answer by robertbu · Jul 28, 2014 at 11:19 PM
You are missing a ';' at the end of line 3. For future questions please include a copy of the error message from the console. it gives is the line of the error and the scack trace. Note that reported errors are frequently on the previous code line. The reported line is just where the compiler was confused enough to generate an error.
Your answer