# How do I fix this?

**URL:** <https://forum.kirupa.com/t/how-do-i-fix-this/11980>\
**Category:** flash\
**Created:** [January 24, 2003, 9:31pm UTC](https://forum.kirupa.com/t/how-do-i-fix-this/11980 "2003-01-24T21:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milestrap](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@milestrap](https://forum.kirupa.com/u/milestrap)\
**Post date:** [January 24, 2003, 9:31pm UTC](https://forum.kirupa.com/t/how-do-i-fix-this/11980/1 "2003-01-24T21:31:03Z")

</div>

Plz check this script.

what am I doing wrong?

```php
 
this.onEnterFrame = function() { 
       if (_root.bgm.is_playing == true) { 
               n = eval("_level100.s" + (substring (_name, 5, 2))); 
               _y = (orig_y - n); 
       } else { 
               eval("_level100.s" + (substring (_name, 5, 2))) = null; 
               _y = orig_y; 
       } 
} 

```

output=  
Frame=1: Line 7: Left side of assignment operator must be variable or property.  
eval("\_level100.s" + (substring (\_name, 5, 2))) = null;

but still can’t get it to work. I must be :crazy:

Thanks:crazy:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 25, 2003, 2:02pm UTC](https://forum.kirupa.com/t/how-do-i-fix-this/11980/2 "2003-01-25T14:02:17Z")

</div>

It’s saying that the eval function can not be placed on the left side of an operation line…

Therefore… It’s trying to look for a variable to hold null… And it can not find one.

:cool: Therefore…

You wanna set another variable to equal that eval statement and then call a \_root[eval("\_level100.s" + (substring (\_name, 5, 2)))] = null;

Try that out and see if it works better for you. If it doesn’t… I’d suggest using another variable set.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 26, 2003, 1:22am UTC](https://forum.kirupa.com/t/how-do-i-fix-this/11980/3 "2003-01-26T01:22:00Z")

</div>

That works … Thanks !!!
