# Getting error on vaiable code declaration

**URL:** <https://forum.kirupa.com/t/getting-error-on-vaiable-code-declaration/328474>\
**Category:** flash\
**Created:** [May 19, 2012, 5:18pm UTC](https://forum.kirupa.com/t/getting-error-on-vaiable-code-declaration/328474 "2012-05-19T17:18:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [May 19, 2012, 5:18pm UTC](https://forum.kirupa.com/t/getting-error-on-vaiable-code-declaration/328474/1 "2012-05-19T17:18:06Z")

</div>

Hi,

I am getting the following errors for this code:  
AS3 Code:

```auto
var xmlcontents:String = {firstName} {lastName} {numbtrial};

```

Error:  
1084: Syntax error: expecting colon before rightbrace.  
1084: Syntax error: expecting identifier before rightbrace.  
1086: Syntax error: expecting semicolon before leftbrace.  
1084: Syntax error: expecting rightbrace before end of program.

Where it goes wrong?

Thanks.
