Hi, I'm new to unity and I'm having a problem with C#, it's showing three errors. Three errors CS1061. I am not able to fix this problem. This is my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour
{

private CharacterController controller;
private Animator anim;

public float speed;
public float gravity;
public float rotspeed;

private float rot;
private Vector3 moveDirection;

// Start is called before the first frame update
void Start()
{
  controller = GetComponent<CharacterController>();
   anim = GetComponent<Animator>(); 
}

// Update is called once per frame
void Update()
{
   Move(); 
}

void Move()
{
   if(controller.isGrounded)
   { 
     if(Input.GetKey(KeyCode.W))
     {
       moveDirection = Vector3.forward * speed;
       anim.SetInterger("transition", 1);
     }
     if(Input.GetKeyUp(KeyCode.W)) 
     {
        moveDirection = Vector3.zero;
        anim.SetInterger("transition", 0);
     }
   }

  rot += Input.GetAxis("Horizontal") * rotspeed * Time.deltaTime; 
  transform.eulerAngles = new Vector3(0, rot, 0);

 moveDirection.y -= gravity * Time.deltaTime;
 moveDirection = transform.TrasformRotate(moveDirection);

 controller.Move(moveDirection * Time.deltaTime);
} 

}

For one, you spell integer wrong.

    anim.SetInterger("transition", 1);

should instead be:

     anim.SetInteger("transition", 1);

This solves 2/3 of the errors.

Next, you should probably send the error messages completely for me to find the third error. If you show what each of them are, I am able to get a deeper look into it.

TrasformRotate

Should be TransformRotate?

It’s worth your while getting to understand the error messages. In fact, this is a relatively easy one. CS1061 says that you are calling a method in a class but the method doesn’t exist.

If you look in the console and click on the red error message, you often get an expanded version of the error. In any case, you should also have been given the line number in error, which should help you find the error.

Two of the errors are because you are calling anim.SetInterger when you should be using anim.SetInteger. That’s typical of the CS1061 error – it’s a spelling issue. The third is near the end where you have transform.TrasformRotate. To be honest, I’m not sure what you’re doing in that line. You’d better review it from scratch.