# Help! Cannot get past an error

**URL:** <https://forum.kirupa.com/t/help-cannot-get-past-an-error/323758>\
**Category:** Uncategorized\
**Created:** [July 15, 2011, 5:03pm UTC](https://forum.kirupa.com/t/help-cannot-get-past-an-error/323758 "2011-07-15T17:03:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell\_Kerr](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Russell\_Kerr](https://forum.kirupa.com/u/Russell_Kerr)\
**Post date:** [July 15, 2011, 5:03pm UTC](https://forum.kirupa.com/t/help-cannot-get-past-an-error/323758/1 "2011-07-15T17:03:05Z")

</div>

Hi all,

I keep receiving this error ‘else’ encountered without matching ‘if’

for this code, with the line throwing up the error being in bold;

tellTarget("")  
{  
if (800 - 3 \* alienHeight - 5 \* aliensDead \< getTimer() - time)  
{  
if (newLife == 1)  
{  
tellTarget(“LaserBase”)  
{  
gotoAndStop(1);  
setProperty("", \_x, 95);  
tellTarget("")  
{  
newLife = 0;  
tonePos = 1;  
} // End of TellTarget  
}  
**else if (newLife)**  
{  
–newLife;  
}  
else  
{  
Sound.gotoAndPlay(“Tone” + tonePos);  
++tonePos;  
if (tonePos == 5)  
{  
tonePos = 1;  
} // end if  
tellTarget(“Spaceship”)  
{  
if (!\_visible && random(40) \< 1)  
{  
setProperty("", \_visible, true);  
} // end if  
tellTarget("")

there is more code after this but i don’t know if it is necessary to post it? please help, i’m quite new to flash and this code is not my own but i would really like to get it working.

cheers
