"';' expected. Insert a semicolon in the end" error

I’m a noob in scripts, and I’m getting this error on this script:

function Update () {
	         if(Input.GetMouseButtonDown(0))
         {
             bDragging = true;
             oldPos = transform.position;
             panOrigin = Camera.main.ScreenToViewportPoint(Input.mousePosition);
         }
 
         if(Input.GetMouseButton(0))
         {
             Vector3 //Unity says there should be an semicolon right here// pos = Camera.main.ScreenToViewportPoint(Input.mousePosition) - panOrigin;
             transform.position = oldPos + -pos * panSpeed;
         }
 
         if(Input.GetMouseButtonUp(0))
         {
             bDragging = false;
         }
		
}

Unity is giving me this error, and as far as I know, that error shouldn’t happen. Can someone help me?

If you’re gonna use UnityScript, you need to learn the right syntax…

var pos : Vector3 = Camera.main.ScreenToViewportPoint(Input.mousePosition) - panOrigin;

Are you coding in C# or UnityScript? Your function is declared using UnityScript syntax, but you’re declaring the Vector3 using C# syntax.