Refusing to Return to a Scene In Javascript

My inventory return system doesn’t seem to work its fine if im on Tutorial 4 then go to Status screen it goes back to Tutorial 4 if I press Back to Map from Tutorial 5, But it doesn’t seem to want to move back if I enter Status from tutorial 5 it just wont let me exit the Status screen if I use the enter status from Tutorial 5 Scene

help would be much appreciated :slight_smile: - Here is the code im trying to use

function OnGUI()
{
   
    if (GUI.Button (new Rect (Screen.width/-10.2f, Screen.height/1.15f, Screen.width/1.9f,Screen.height/10.2f),"",MoveLeft))
    if (PlayerPrefs.GetInt("Currentmap")==1)
   
{
    Application.LoadLevel("Tutorial 4");
}

{   
    if (GUI.Button (new Rect (Screen.width/-10.2f, Screen.height/1.15f, Screen.width/1.9f,Screen.height/10.2f),"",MoveLeft))
    if (PlayerPrefs.GetInt("Currentmap")==2)
   
{
    Application.LoadLevel("Tutorial 5");
}


}
}

Try to print out the PlayerPrefs.GetInt(“Currentmap”) values (when you click the button) to see if its 2 or not…

Nup nothing happened :frowning: I don’t see whats wrong with it

Anyone?

Before the 2nd button, you have extra “{” there, also at the end “}”…

and both buttons are on the same location (on top of each other) ?

I got it heh :slight_smile: