high scores

var i :int;
var newScore : int;
var oldScore : int;
function Update (){
newScore = Counts.floor;
PlayerPrefs.SetInt(“score”,Counts.floor);
for(i =0;i<10;i++){
if(PlayerPrefs.HasKey(i+“score”)){
if(PlayerPrefs.GetInt(i+“score”)<newScore){
oldScore = PlayerPrefs.GetInt(i+“score”);
oldName = PlayerPrefs.GetString(i+“HScoreName”);
PlayerPrefs.SetInt(i+“score”,newScore);
newScore = oldScore;
newName = oldName;
}
}else{
PlayerPrefs.SetInt(i+“score”,newScore);
PlayerPrefs.SetString(i+“score”,newName);
newScore = 0;
}
}
}

function OnGUI (){

GUI.Label(Rect(375, 10, 150, 50), "NAME: "+ PlayerPrefs.GetInt(1+"score"));
GUI.Label(Rect(375, 30, 150, 50), "NAME: "+ PlayerPrefs.GetInt(2+"score"));

}

My game like Tower Bloxx
This script have save high scores only,
but not save second high score,
Please help me . Where are wrong.

Had you taken it from http://answers.unity3d.com/questions/20773/how-do-i-make-a-highscores-board.html? Look carefully at the code in THAT question: the script is NOT embedded into an Update function. Remember that the Update() executes its body each frame. Who wants to check the general ranking for updates EVERY frame? Maybe the problem relies there. Or, maybe, the line that you've omitted is important (newName = "";, after newScore = 0;). These are just suggestions: I can't test it right now, unfortunately.

Beyond these problems, the code seems right: remember that copy&paste isn't always a good solution for advanced scripts.