Script Not Working?

I added this script to my character:

function OnControllerColliderHit(hit : ControllerColliderHit)
{
    if (hit.collider.name == "Exit_Flag")
    {
        Application.LoadLevel(Application.currentLevel + 1);
    }
}

so when i hit a flag i made named Exit_Flag it would go to the next level because Statement was nice enough to make it for me.

When i try to test the game i get this error:

Assets/Change Level.js(5,43): BCE0019: 'currentLevel' is not a member of 'UnityEngine.Application'.

Anyone know a fix?

I dont know if you can type it the way you did (Application.currentLevel +1), mabye. Try typing the name of your scene instead. if your next level is called MenuScene, then type:

   if(some event has happend)
    {
       Application.LoadLevel(MenuScene);
    }

or

 if(some event has happend)
    {
       Application.LoadLevel("MenuScene");
    }

Application.currentLevel should be Application.loadedLevel.

Sorry for the mistake!