Please could someone help, here is my javaScript, after updating unity i am getting the BCE0005 error. The issue is with the ‘for(i=0;i<10;i++)’ part, i have tried changing it to ‘var for(i=0;i<10;i++)’, but then it changes into another error. any suggestions?
var newScore : int;
var oldScore : int;
newScore = Count;
for(i=0;i<10;i++)
{
if(PlayerPrefs.HasKey(i+"HScore")){
if(PlayerPrefs.GetInt(i+"HScore")<newScore){
oldScore = PlayerPrefs.GetInt(i+"HScore");
PlayerPrefs.SetInt(i+"HScore",newScore);
newScore = oldScore;
}
}else{
PlayerPrefs.SetInt(i+"HScore",newScore);
newScore = 0;
Thanx in advance