(23,34): BCE0019: 'SetButton' is not a member of 'UnityEngine.Animator'.

hello i have this problem in this script

#pragma strict

private var animator: Animator;

var h: float; // Obrót

var v: float; // Przód/tył

var hSpeed: int;

function Start () {

         animator = GetComponent(Animator);

}

function Update () {

h = Input.GetAxis('Horizontal');

    v = Input.GetAxis('Vertical');

if(Input.GetButton('Jump'))

                    animator.SetBool('Jump',true);

               else	

                    animator.SetBool('Jump',false);
		
	if(Input.GetButton('Run'))

                    animator.SetButton('Run',true);

               else

                    Animator.Set.Bool('Bieg',false);	

}

function FixedUpdate () {

var h : float = Input.GetAxis(“Mouse X”);

transform.Rotate(0, h, 0);

animator.SetFloat (“Speed”, v);

animator.SetFloat (“Direction”, h);

}

	if(Input.GetKeyDown(KeyCode.Tab)){

                Screen.showCursor = false;

            }

            else     

            {

            	Screen.showCursor = true;

            }

As the error says: SetButton does not exist, look at the Animator documentation please. Also you’re writing the latest piece of code (“if(Input.GetKeyDown(KeyCode.Tab)){” etc) out of any function, it should stay inside the function Update. And “Animator.Set.Bool” (inside your Update) does not exist, it should be: animator.SetBool(‘Bieg’,false);

By the way I noticed you fixed your FixedUpdate code with my answer, but you forgot to mark the answer as accepted, you should accept the answers if they work so that everyone else having an issue can take advantage of the solutions.