i've got this piece of code from the nokia forum on how to make a highscore. http://wiki.forum.nokia.com/index.php/How_to_create_a_high_score_database_in_Java_ME
but when i try to read the content it doesnt work.
i've changed it a bit because it had a few erros, but it still doens't work, can anyone help please?
RecordStore highscore;
RecordEnumeration enume;
byte[] record;
byte[] strb;
String str;
int id;
int fin;
try{
highscore = RecordStore.openRecordStore("Pontuacao", true);
str = new String("John,3400");
strb = str.getBytes();
highscore.addRecord(strb, 0, strb.length);
enume = highscore.enumerateRecords(null, null, false);
while (enume.hasNextElement()){
id = enume.nextRecordId();
fin = enume.getRecord(id, record, 0);
str = new String(fin);
}
}catch(IOException ex){
ex.printStackTrace();
}finally{
highscore.closeRecordStore();
}
thanks
