BCE0026: 'void' cannot be used in a boolean

I want to say if player presses the load button and player went into Final1 (level2) then make player go to Final1

not sure what the error means

BCE0026: ‘void’ cannot be used in a boolean

line 23

#pragma strict

public var level:String;
public var sound4: AudioClip;
public var Metal_Impact_Hollow: AudioClip;

function Start () 
{



}

function Update () 
{

}
//if the mouse is on the object


function OnMouseDown()
{
	if(level.Equals("Quit") Application.LoadLevel("LoseScreen"))
	{
		Application.Quit();
	}
	else
	{
	
	Application.LoadLevel(level);
	
	audio.Play();
	
	}
}

function OnMouseEnter ()
{

	audio.Play();

}

Application.LoadLevel doesn’t return anything, so you can’t use it in an if statement. Maybe you meant loadedLevel.

–Eric

oh and instead of LoseScreen I meant to type Final1

and eric it says unidentified loadedLevel when i put that in

mailamerc its Application.loadedLevel

Seriously the amount of help you asked for on such trivial basic coding practices.

if(level.Equals(“Quit”) Application.loadedLevelName == “LoseScreen”)

it’s because I’m an ARTIST trying to get by my useless programming class in my college. The college program is mainly art. The reason why they chose to put programming classes is beyond me. So I need to pass my last class of programming and I get my papers. huhhh