Hey! I can not get this script to work! One of parts of the script will not work when called! Please help a C# beginner!
highscorefor10 = PlayerPrefs.GetInt("highscore10");
if(clickCount > highscore10){ // WORKS
PlayerPrefs.SetInt("highscore10", clickCount);
GUI.Label (new Rect (45, 150, 400, 400), "New highscore");
GUI.Label (new Rect (120, 170, 400, 400), "" + clickCount);
PlayerPrefs.Save();
if(GUI.Button(new Rect(25,5,75,30), "Upload")) {
Application.LoadLevel("mouseboard10");
}
}
else if(clickCount < highscore10) // DONT WORK FROM HERE
{
GUI.Label (new Rect (45, 200, 400, 400), "Highscore: " + highscorefor10);
GUI.Label (new Rect (45, 150, 400, 400), "Score: " + clickCount);
if(GUI.Button(new Rect(130,5,120,30), "Restart")) {
Application.LoadLevel(bane);
}
if(GUI.Button(new Rect(25,5,75,30), "Menu")) {
Application.LoadLevel("StartMenu");
}
}