# Load / save XML Highscores

**URL:** <https://forum.kirupa.com/t/load-save-xml-highscores/332644>\
**Category:** Uncategorized\
**Created:** [September 5, 2014, 5:39pm UTC](https://forum.kirupa.com/t/load-save-xml-highscores/332644 "2014-09-05T17:39:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![badmonur](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@badmonur](https://forum.kirupa.com/u/badmonur)\
**Post date:** [September 5, 2014, 5:39pm UTC](https://forum.kirupa.com/t/load-save-xml-highscores/332644/1 "2014-09-05T17:39:47Z")

</div>

I have a piece of code that checks to see if my highscores are in place and i need it to save and load the high score data.

Check to see if points have been assigned - Works

```auto
if(!highcombo||!highscore){
    high_combo.text="x1";
high_score.text="000pts";

}else{
    high_combo.text="x"+highcombo;
high_score.text=highscore+"pts";
}

```

Sets High Scores and High Combos - Works

```auto
if(totalscore<currentscore){
totalscore=calcscore;

}else{
    currentscore=calcscore;

}
highscore=totalscore;
//Get High Combo
if(totalcombo<currentcombo){
totalcombo=combo;

}else{
    currentcombo=combo;

}
highcombo=totalcombo;
high_combo.text="x"+highcombo;
high_score.text=highscore+"pts";

```

XML File - Highscore.xml

```auto
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/3.2">
  <score>000</score>
    <combo>1</combo>
</application>

```
