Hi I am new to unity and I am following a video tutorial exactly as he does it. Although when even though I followed him exactly I still got 8 errors… I was able to figure out 7 of these errors but one won’t fix itself no matter what I try. It says that line 56 has a parsing error. Can someone please tell me what I did wrong and how to fix it? BTW I made it obvious which line 56 is.
using UnityEngine;
using System.Collections;
public class PlayerMovement : MonoBehaviour
{
public float moveSpeed = 5.0f;
public float rotateSpeed = 60.0f;
public bool canMoveSideways = false;
void Update ()
{
//Movement ();
}
void Movement ()
{
if (Input.GetKey (KeyCode.UpArrow)) {
Debug.Log (“Key UpArrow Pressed.”);
this.transform.Translate (new Vector3 (0, 0, moveSpeed * Time.deltaTime));
} else if (Input.GetKey (KeyCode.DownArrow)) {
Debug.Log (“Key DownArrow Pressed.”);
this.transform.Translate (new Vector3 (0, 0, -moveSpeed * Time.deltaTime));
}
if (Input.GetKey (KeyCode.LeftArrow)) {
if (canMoveSideways) {
Debug.Log (“Key LeftArrow Pressed.”);
this.transform.Translate (new Vector3 (moveSpeed * Time.deltaTime, 0, 0));
} else {
Debug.Log (“Key LeftArrow Pressed: Rotate”);
this.transform.Rotate (new Vector3 (0, -rotateSpeed * Time.deltaTime, 0));
}
} else if (Input.GetKey (KeyCode.RightArrow)) {
if (canMoveSideways)
Debug.Log (“Key RightArrow Pressed.”);
this.transform.Translate (new Vector3 (-moveSpeed * Time.deltaTime, 0, 0));
}
else
{
Debug.Log (“Key RightArrow Pressed: Rotate”);
this.transform.Rotate (new Vector3 (0, rotateSpeed * Time.deltaTime, 0));
}
}
}
if ( Input.GetKey ( KeyCode.W ) ) THIS IS THE ONE I NEED HELP ON!!!
}
{
Debug.Log ( “Key W Pressed.” );
this.transform.Translate ( new Vector3 ( 0, moveSpeed * Time.deltaTime, 0 ) );
}
else if (Input.GetKey ( KeyCode.S ))
{
Debug.Log ( “Key S Pressed.” );
this.transform.Translate ( new Vector3 ( 0, -moveSpeed * Time.deltaTime,0 ) );
}
}
}