Unexpected Token:.. while following a tutorial.

Hello all,
Im new to scripting so I’m following a tutorial however I get the following error:
“SideTrigger.js(7,30): BCE0043: Unexpected token: …”
The tutorial I’m following is for an older version of Unity (I have 4.3 and I think the tutorial is for 3.x). I’ve read that the JS component of Unity has changed a bit since 3.x, so I’m guessing that’s why I get the error but I can’t seem to figure out a solution.

The error is for the line:
var dievalueComponent.currentValue=faceValue;

Below is the full script:

#pragma strict
public var faceValue = 0;

function OnTriggerEnter(other : Collider){
	var dieGameObject=GameObject.Find("SixSidedDie");
	var dieValueComponent=dieGameObject.GetComponent("DieValue");
	var dievalueComponent.currentValue=faceValue;
	Debug.Log(faceValue);
}

function Update () {

}

This code would also have trouble in 3.x. The problem is line 7. It should be:

dieValueComponent.currentValue=faceValue;

First you need to not use ‘var’. Second the spelling and case must batch the variable you declared in the previous line.