coding error

This error pops up
Assets/Standard Assets/Character Controllers/Sources/Scripts/PlayerAnimate.js(8,29): BCE0020: An instance of type ‘UnityEngine.GameObject’ is required to access non static member ‘GetComponent’.

my code is this
#pragma strict

function Start () {

}

function Update () {
var AT = GameObject.GetComponent(AnimateTexture); //Store AnimateTexture Script
if(Input.GetKey(“a”)){ //Player moves left
AT.rowNumber = 1; //Change to running animation
} else if(Input.GetKey(“d”)){ //Player moves right
AT.rowNumber = 1; //Change to running animation
} else { //Player is not moving
AT.rowNumber = 0; //Change to idle animation!
}
}

Firstly please format you code next time (the button labeled “101010” will help) it can be tricky but keep working at it until your post preview shows it is formatted.

Your line:

var AT = GameObject.GetComponent(AnimateTexture);

Should be:

var AT = gameObject.GetComponent(AnimateTexture);

GameObject is the class and is useful for accessing utility methods that have been implemented as static e.g. GameObject.Find()

gameObject is the variable used to access the GameObject instance your script is attached to. It is useful for accessing methods that apply to this GameObject e.g. gameObject.GetComponent()