so I have all my code matching the lesson but then when I go to compile it, I receive this error in Unity:
Below is my code. Also, I don’t know why the code needs 3 braces at the end, but it won’t work without them.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
ProcessThrust();
ProcessRotation();
}
void ProcessThrust()
{
if (Input.GetKey (KeyCode.W))
{
Debug.Log("W pressed, Thrusting");
{
}
void ProcessRotation()
{
if (Input.GetKey (KeyCode.A))
{
Debug.Log("A pressed, rotating counterclockwise");
}
else if (Input.GetKey (KeyCode.D))
{
Debug.Log("D pressed, rotating clockwise");
}
}
}}}
I hope I can get this to work right. it’s driving me crazy