Hello! I would like to know how to fix this error and what it means I am writing for the first time. And I'm new to C#
C#:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float speed;
private Rigidbody rb;
float MoveHorizontal;
float MoveVertical;
void Start()
{
rb = GetComponent<RigidBody>();
}
void FixedUpdate()
{
Vector3 movement = new Vector3(MoveHorizontal, 0.0f, MoveVertical);
rb.AddForce(movement * speed);
}
public void Up()
{
MoveVertical = 1f;
}
public void Down()
{
MoveVertical = -1f;
}
public void StopMoveVertical()
{
MoveVertical = of;
}
public void Left()
{
MoveVertical = 1f;
}
public void Right()
{
MoveHorizontal = -1f;
}
public void StopMoveHorizontal()
{
MoveHorizontal = 'of';
}
}