Problem with symbol

Guys, with that code unity says that in lane 10 unexpected symbol “:”. But i used every combination, it doesn’t work!.

using UnityEngine;
    using System.Collections;
        
        
        
        public class NewBehaviourScript : MonoBehaviour {
        
        
        
        	var movieTexture : MovieTexture;
        
        
        
        	function Start() {
        
        		movieTexture.loop = true;
        
        		renderer.material.mainTexture = movieTexture;
        
        		movieTexture.Play ();
        
        	}
        
        }

Hi!

It looks like you are using a mix of C# and UnityScript(A sort of JavaScript).

Seeing as most of it is in UnityScript, this is what it should look like :wink:

#pragma strict

var movieTexture : MovieTexture;
  
function Start() {
 	movieTexture.loop = true;
	renderer.material.mainTexture = movieTexture;
	movieTexture.Play ();
 }

I strongly recommend checking out this forum thread to learn more about coding in Unity:
http://forum.unity3d.com/threads/113937-Getting-Started-with-Coding-for-Unity

Hope it helps!