Hi People,
i have this bug : Type ‘char’ does not support slicing
With :
var highScores :String =uvw.text;
//var highScores= [{"id":"28","flavor":"Amande","highscore":"175"},{"id":"25","flavor":"Macaron","highscore":"660"}];
for( i =0;i<highScores.Length;i++)
{
switch(highScores[i]["flavor"])
{
case "Vanille":
highScoreVanilla = highScores[i]["highscore"];
break;
case "Macaron":
highScoreMacaron= highScores[i]["highscore"];
break;
case "Amande":
highScoreAlmonds = highScores[i]["highscore"];
break;
}
}
But nothing whith :
//var highScores :String =uvw.text;
var highScores= [{"id":"28","flavor":"Amande","highscore":"175"},{"id":"25","flavor":"Macaron","highscore":"660"}];
for( i =0;i<highScores.Length;i++)
{
switch(highScores[i]["flavor"])
{
case "Vanille":
highScoreVanilla = highScores[i]["highscore"];
break;
case "Macaron":
highScoreMacaron= highScores[i]["highscore"];
break;
case "Amande":
highScoreAlmonds = highScores[i]["highscore"];
break;
}
}
ps uvw is a WWW www
And i’m sur that highScore = {“id”:“28”,“flavor”:“Amande”,“highscore”:“175”},{“id”:“25”,“flavor”:“Macaron”,“highscore”:“660”} tested on my server and working
Any help plz !