# Text problem

**URL:** <https://forum.kirupa.com/t/text-problem/243786>\
**Category:** Uncategorized\
**Created:** [November 10, 2007, 9:44pm UTC](https://forum.kirupa.com/t/text-problem/243786 "2007-11-10T21:44:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonthelion](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@leonthelion](https://forum.kirupa.com/u/leonthelion)\
**Post date:** [November 10, 2007, 9:44pm UTC](https://forum.kirupa.com/t/text-problem/243786/1 "2007-11-10T21:44:30Z")

</div>

Im having a problem with this text code, first I have the load code (that I didn’t make)

```php
 
function loadGame(){
 myLSO = SharedObject.getLocal("uniqueName");
 if(myLSO.data.myObj == undefined){ // No object exists
  trace("No Saved Game");
 }
 else{
  trace("Loaded Game");
  hp = myLSO.data.myObj.objArray[0];
  mp = myLSO.data.myObj.objArray[1];
  maxhp = myLSO.data.myObj.objArray[2];
  atk = myLSO.data.myObj.objArray[3];
  money = myLSO.data.myObj.objArray[4];
  lv = myLSO.data.myObj.objArray[5];
  expirence = myLSO.data.myObj.objArray[6];
  expirencemax = myLSO.data.myObj.objArray[7];
  maxmp = myLSO.data.myObj.objArray[8];
 
 
 }

```

What I want it to do is instead of doing trace, I want it to add text to a dynamic text with the variable info. So if there is no data to load it will say “no saves found” or something and if there is a file to load it will say “game loaded”. This is some code that someone gave me,

```php
_root.fight.text = _root.fight += "<font color=\"#003399\"><B>- You use a potion - You gain <font color=\"#FF0000\">" + heal + " HP<font color=\"#003399\"><B>!\r</font></B>";
_root.fight.scroll +=1;

```

but I can’t figure out where I can change it to do what I want.

Thanks
