"Insert a semicolon at the end." But there is a semicolon already!!

Hi. I (try to) use the ProgressBar script, but I get this error:

29241-error.png

Here is the script:

void Update() {
	float revealOffset = (float)(Time.timeSinceLevelLoad % 10) / 10.1F; 
 
	gameObject.renderer.material.SetFloat ("_Cutoff", revealOffset);
}

As you can see, there IS already a semicolon.
What should I do? I tried to insert “var” at the second line, but it didn´t help.

EDIT: Ok, I changed it into C#, now I don´t get this error but I get a new parsing error at the same line…

The code you posted is in c# not javascript, use the correct script type and you will be good(maybe?).

// UnityScript(javascript) version if you need

function Update() {
  var revealOffset : float = (Time.timeSinceLevelLoad % 10) / 10.1F; 

  gameObject.renderer.material.SetFloat ("_Cutoff", revealOffset);

}