Где мои ошибки подскажите пожалуйста

89,24): error CS1519: Invalid token ‘=’ in class, record, struct, or interface member declaration
(88,3): error CS1519: Invalid token ‘{’ in class, record, struct, or interface member declaration
(90,24): error CS1519: Invalid token ‘=’ in class, record, struct, or interface member declaration
error CS1519: Invalid token ‘=’ in class, record, struct, or interface member declaration
(92,24): error CS1519: Invalid token ‘=’ in class, record, struct, or interface member declaration
95,3): error CS8803: Top-level statements must precede namespace and type declarations.
95,3): error CS0106: The modifier ‘private’ is not valid for this item
(103,3): error CS0106: The modifier ‘private’ is not valid for this item
(113,3): error CS0106: The modifier ‘private’ is not valid for this item
(118,1): error CS1022: Type or namespace definition, or end-of-file expected
вот сам скрипт

> 1. using System.Collections;
> 2. using System.Collections.Generic;
> 3. using UnityEngine;
> 4. using TMPro;
> 
> 5. public enum DrivetrainType
> 6. {
> 7.     FWD, //front - wheel-drive
> 8.     RWD, //rear-wheel-drive
> 9. }
> 10. public class CarMovementController : MonoBehaviour
> 11. {
> 12.   [SerializeField] DrivetrainType drivetrainType;
> 13.   private Rigidbody rb;
> 
> 14.   [SerializeField] WheelCollider wheelFL;
> 15.   [SerializeField] WheelCollider wheelFR;
> 16.   [SerializeField] WheelCollider wheelRL;
> 17.   [SerializeField] WheelCollider wheelRR;
> 
> 18.   private float rbVelocityLimit = 15f;
> 19.   private float accelartionStraight = 400f;
> 
> 20.   private float currentYRotation;
> 21.   private float targetYRotation;
> 
> 22.     [SerializeField] private AnimationCurve Curve;
> 
> 23.   private void Awake()
> 24.   { 
> 25.     rb = GetComponent<Rigidbody>();
> 
> 26.     wheelFL.transform.localEulerAngles = Vector3.zero;
> 27.     wheelFR.transform.localEulerAngles = Vector3.zero;
> 28.   }
> 29.   private void FixedUpdate()
> 30.   {
> 31.     float horizontalForce = Input.GetAxis("Horizontal");
> 32.     float verticalForce = Input.GetAxis("Verticval");
> 
> 33.     float currentVelocity = rb.velocity.magnitude;
> 34.     targetYRotation = horizontalForce * curve.Evalute(currentVelocity);
> 
> 35.     RotateWheels(targetYRotation);
> 
> 36.     wheelFL.steerAngle = targetYRotation;
> 37.     wheelFR.steerAngle = targetYRotation;
> 
> 38.     currentYRotation = targetYRotation;
> 
> 39.     if (verticalForce > 0)
> 40.     {
> 41.       ResetBrakes();
> 
> 42.      if (drivetrainType == DrivetrainType.FWD)
> 43.      {
> 44.        wheelFL.motorTorque = verticalForce * accelartionStraight * (2.8f - currentVelocity / rbVelocityLimit);
> 45.        wheelFR.motorTorque = verticalForce * accelartionStraight * (2.8f - currentVelocity / rbVelocityLimit);
> 
> 46.        wheelRL.motorTorque = verticalForce * accelartionStraight * (2.2f - currentVelocity / rbVelocityLimit);
> 47.        wheelRR.motorTorque = verticalForce * accelartionStraight * (2.2f - currentVelocity / rbVelocityLimit);
> 48.      }
> 49.      else if  (drivetrainType == DrivetrainType.RWD)
> 50.      {
> 51.        wheelFL.motorTorque = verticalForce * accelartionStraight * (2.2f - currentVelocity / rbVelocityLimit);
> 52.        wheelFR.motorTorque = verticalForce * accelartionStraight * (2.2f - currentVelocity / rbVelocityLimit);
> 
> 53.        wheelRL.motorTorque = verticalForce * accelartionStraight * (2.8f - currentVelocity / rbVelocityLimit);
> 54.        wheelRR.motorTorque = verticalForce * accelartionStraight * (2.8f - currentVelocity / rbVelocityLimit);
> 55.      }
> 56.     }
> 57.     float moveDirection = Vector3.Dot(transform.forward, rb.velocity);
> 58.     if (moveDirection < -0.5f && verticalForce > 1)
> 59.     {
> 60.       PerformBrake(Mathf.Abs(verticalForce));
> 61.     }
> 62.     else if (moveDirection > 0.5f && verticalForce < 0)
> 63.     {
> 64.       PerformBrake(Mathf.Abs(verticalForce));
> 65.     }
> 66.     else if (verticalForce <0)
> 67.     {
> 68.       //PerformMoveBackwards
> 69.     }
> 
> 70.   }
> 71.   private void ResetBrakes();
> 72.   {
> 73.     wheelFL.brakeTorque = 0f;
> 74.     wheelFR.brakeTorque = 0f;
> 75.     wheelRL.brakeTorque = 0f;
> 76.     wheelRR.brakeTorque = 0f;
> 77.   }
> 
> 78.   private void PerformBrake(float force)
> 79.   {
> 80.     wheelFL.brakeTorque = force * 150f * 0.3f * accelartionStraight;
> 81.     wheelFR.brakeTorque = force * 150f * 0.3f * accelartionStraight;
> 82.     wheelRL.brakeTorque = force * 150f * 0.7f * accelartionStraight;
> 83.     wheelRR.brakeTorque = force * 150f * 0.7f * accelartionStraight;
> 84.   }
> 
> 85.   private void PerformMoveBackwards(float forse)
> 86.   {
> 87.     ResetBrakes();
> 
> 88.     wheelFL.motorTorque = force * accelartionStraight * 0.4f;
> 89.     wheelFR.motorTorque = force * accelartionStraight * 0.4f;
> 90.     wheelRL.motorTorque = force * accelartionStraight * 0.4f;
> 91.     wheelRR.motorTorque = force * accelartionStraight * 0.4f;
> 92.   }
> 93.   
> 94.   private void RotateWheels(float targetYAngle)
> 95.   {
> 96.     wheelFL.transform.localEulerAngles = new Vector3(wheelFL.transform.localEulerAngles.x, targetYAngle, wheelFL.transform.localEulerAngles.z);
> 97.     wheelFR.transform.localEulerAngles = new Vector3(wheelFR.transform.localEulerAngles.x, targetYAngle, wheelFR.transform.localEulerAngles.z);
> 98.   }
> 99. }

The line numbers in the errors are much higher than the number of lines in the code posted.

The posted code also appears to have line numbers embedded. That will never work so take them out if they are in there.

You don’t need us to fix your typing mistakes. You can fix your own typing mistakes. Here’s how:

The complete error message contains everything you need to know to fix the error yourself.

The important parts of the error message are:

  • the description of the error itself (google this; you are NEVER the first one!)
  • the file it occurred in (critical!)
  • the line number and character position (the two numbers in parentheses)
  • also possibly useful is the stack trace (all the lines of text in the lower console window)

Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.

Look in the documentation. Every API you attempt to use is probably documented somewhere. Are you using it correctly? Are you spelling it correctly? Are you structuring the syntax correctly? Look for examples!

All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don’t have to stop your progress and fiddle around with the forum.

Remember: NOBODY here memorizes error codes. That’s not a thing. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.