error BCE0005

this what the error say
BCE0005: Unknown identifier: 'LevelToLoad

And here the code what I’m getting the error from

var movTexture : MovieTexture;

function Start () {

renderer.material.mainTexture = movTexture;

movTexture.Play();

}

function Update(){

if(!movTexture.isPlaying){

  //movTexture.Stop();

  Application.LoadLevel(levelToLoad); //Level 1

}

}

it’s the line Application.LoadLevel(levelToLoad);

try

Application.LoadLevel("Name of level");

or make sure levelToLoad is a valid var:

var levelToLoad : int = 1;

var movTexture : MovieTexture;

function Start () {

renderer.material.mainTexture = movTexture;

movTexture.Play();

}

function Update(){

if(!movTexture.isPlaying){

  //movTexture.Stop();

  Application.LoadLevel(levelToLoad); //Level 1

}

}

(where the int is the number of the desired level as seen in build settings)

that or you’re accidentally referring to it somewhere else as LevelToLoad (capital)

the error should give the exact line number of the prob

thank you ill try it and see :slight_smile:

i add to the level 1 to the build setting and I’m getting this Level name of level (1) couldn’t be loaded because it has not been added to the build setting but i did add it here a screen shot of it