# Syntax error

**URL:** <https://forum.kirupa.com/t/syntax-error/232853>\
**Category:** Uncategorized\
**Created:** [July 18, 2007, 10:18am UTC](https://forum.kirupa.com/t/syntax-error/232853 "2007-07-18T10:18:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aigarinsh](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@aigarinsh](https://forum.kirupa.com/u/aigarinsh)\
**Post date:** [July 18, 2007, 10:18am UTC](https://forum.kirupa.com/t/syntax-error/232853/1 "2007-07-18T10:18:24Z")

</div>

I have a code like this, but it I can’t get it right. Why can’t I use mcMain.“contentItem”+i.item\_name ? If I use mcMain.contentItem1.item\_name then it works. How should I make it correct to use i variable?

```auto

mcMain.attachMovie("contentSubtitle", "contentItem"+i, mcMain.getNextHighestDepth(), {_y:mcMain.height, _x:0});
mcMain."contentItem"+i.item_name = "some text";
i++;

```
