Help, problem with semicolon

I have this script:

#pragma strict
public var speed = 0.5f;

function Update () 
{
	Vector2 offset = new Vector2(0, Time.time * speed);
	renderer.material.mainTextureOffset = offset;
}

And it says Assets/Sky.js(7,16): UCE0001: ‘;’ expected. Insert a semicolon at the end.
what is wrong?!

Hello, @Pejovski!

Here is the fixed version of your script, Sky.js:

#pragma strict

// Previous: public var speed = 0.5f;
// That was okay, but let's define its type for clarity.
public var speed : float = 0.5f;
 
function Update () 
{
	// Previous: Vector2 offset  = new Vector2( 0, Time.time * speed );
	// That was an invalid way of declaring a variable.
    // This is how we declare a certain type of variable in JS:
	var offset : Vector2 = new Vector2( 0, Time.time * speed );

	// Previous: renderer.material.mainTextureOffset = offset;
	// That was obsolete. This is how we do it now:
	GetComponent.< Renderer >().material.mainTextureOffset = offset;
}

Please read the comments to understand what the issues were and what changes were made.