Invalid Layer Index '-1'

Guys I really need help! I watched a video in script and added a script to my character and i thought i learn to make a animator controller but it didn’t work.

The script :

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

public class Skeleton : MonoBehaviour {

public Animator anim;

// Use this for initialization
void Start ()
{
anim = GetComponent();
}

// Update is called once per frame
void Update ()
{
if (Input.GetKeyDown (“1”)) {

anim.Play(“Skeleton@Stand”,-1,0f);

}
}
}

Please help!

  1. Do you have an animator component on the character gameobject?
  2. are all the animations and/or animation blend trees set up?
  3. Does the Skeleton@Stand animation exist?
  4. are there any errors in the console window appearing?

The error tells you everything you need to know, -1 is an invalid index. Make it 0 if you want the first layer in your animator.

but how