So I'm working on a leaderboard that stores up to 3 scores at at time. I've made it so that: Code (JavaScript): var scoreNo1 : int =0; var scoreNo2 : int =0; var scoreNo3 : int =0; startTime = Time.timeSinceLevelLoad; newScore = startTime; if (deathMover.newScore > scoreNo1){ scoreNo3 = scoreNo2; scoreNo2 = scoreNo1; scoreNo1 = deathMover.newScore; } else if (deathMover.newScore > scoreNo2){ scoreNo3 = scoreNo2; scoreNo2 = deathMover.newScore; } else if (deathMover.newScore > scoreNo3){ scoreNo3 = deathMover.newScore; } } The function that contains the If Statements is called within the Start Function and the "startTime" & "newScore" statements are within other scripts. The problem is that scoreNo1 is constantly being overwritten no matter what. If I could lock it down and make it so that once the newScore was passed to scoreNo1, scoreNo1 keeps that value until it's beaten (and then passes it down to scoreNo2) that would be great!
where is this code being executed? what is deathMover? this script, if so why are you using "deathMover.newScore" and "newScore"? you "lock down" a variable by not updating it when you don't want to... so we really need to know more about what is going on if you want help spotting where your logic flow is going wrong.