I wrote a code in wich I tell the game to create save and insertname actors only if the score is higher than the 10th score.
I put in save actor some conditions to determine in wich position place the name.
For example if you obtain the highscore:
If( score.textNumber>firstscore.textNumber)
strcpy(name[3], name[2]);
strcpy(name[2], name[1]);
strcpy(name[1], name[0]);
sprintf(insertname.text, name[0]);
saveVars("Highscore.dat", "nscore");
The conditions are the same I used for score and they work pretty well.
The sprintf part changes according to the score obtained.
For ex if you obtain a score higher than the 2nd the code is:
If(score.textNumber<firstscore.textNumber)
If(score.textNumber>secondscore.textNumber)
strcpy(name[4], name[3]);
strcpy(name[3], name[2]);
strcpy(name[2], name[1]);
sprintf(insertname.text, name[1]);
saveVars("Highscore.dat", "nscore");
Name[0] (the name in the first place) doesn't change and so on until the 10th place.
I know it is a very long way to do this but it is very effective, at least for score...
Strcpy( variable1, variable2 to be copied in 1) right?