- Home /
Question by
CatvsShark · May 06, 2014 at 06:30 PM ·
errormessage
How Do I Fix Unexpected Char 0x201C? (Code Below)
#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.
}
}
Comment
In addition to the problem on mentioned by @Landern, you have hidden characters on lines 2, 4 and 6. It looks this script when through some sort of word processing-type app. Retype the offending lines.
Answer by Landern · May 06, 2014 at 06:33 PM
You are using character 201c(unicode) which is a left quotation mark: Left Quotation Mark Unicode Lookup
Use a normal double quote "a", "d", etc