- Home /
How to make a High Score menu - Javascript
I need to make a High Score menu for my game, but the following link seems to be outdated and I'm trying to figure out how to make it work with the newer version of Unity - http://answers.unity3d.com/questions/20773/how-do-i-make-a-highscores-board.html
When I try to use the code that's provided in that link, I get an error that " 'i' is an unknown identifier." The only reason this confuses me is because in the for loop, isn't " i " being Initialized? Heavily confused. So, if the link above is outdated, does anyone know of a better or more updated way to create a High Score menu?
The code at the link is not outdated. He likely did not have a #pragma strict at the top of the file, and you likely do. The fix is to declare i by putting 'var' in front of it:
for(var i=0;i<10;i++){
Your answer
![](https://koobas.hobune.stream/wayback/20220613140749im_/https://answers.unity.com/themes/thub/images/avi.jpg)