# Help me solve the problem in work AS2

**URL:** <https://forum.kirupa.com/t/help-me-solve-the-problem-in-work-as2/289036>\
**Category:** Uncategorized\
**Created:** [May 25, 2009, 1:22pm UTC](https://forum.kirupa.com/t/help-me-solve-the-problem-in-work-as2/289036 "2009-05-25T13:22:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![walerka](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@walerka](https://forum.kirupa.com/u/walerka)\
**Post date:** [May 25, 2009, 1:22pm UTC](https://forum.kirupa.com/t/help-me-solve-the-problem-in-work-as2/289036/1 "2009-05-25T13:22:48Z")

</div>

When using this code:

```auto
on (release)
{
    if (answer == correct)
    {
        tellTarget("result")
        {
            gotoAndPlay("win");
            tellTarget("")
            {
                points = Number(points) + 1;
                nextFrame ();
            }
        }
        else if (answer eq "")
        {
        }
        else
        {
            tellTarget("result")
            {
                gotoAndPlay("lose");
                tellTarget("")
                {
                    nextFrame ();
                } 
            }
        }
    }
}

```

I get this error:

Scene=Scene 1, Layer=Answer, Frame=3: Line 14: ‘else’ encountered without matching ‘if’ - source: else if (answer eq “”)

how to solve this problem?

Thanks
