# Code check, getting my else statement to work

**URL:** <https://forum.kirupa.com/t/code-check-getting-my-else-statement-to-work/188960>\
**Category:** flash\
**Created:** [May 12, 2006, 3:02am UTC](https://forum.kirupa.com/t/code-check-getting-my-else-statement-to-work/188960 "2006-05-12T03:02:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![messlah](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@messlah](https://forum.kirupa.com/u/messlah)\
**Post date:** [May 12, 2006, 3:02am UTC](https://forum.kirupa.com/t/code-check-getting-my-else-statement-to-work/188960/1 "2006-05-12T03:02:52Z")

</div>

Hi all I am having a little bit of trouble getting the second part of my if statement to function.

if(navvar == 1){  
this.option1.gotoAndStop(“paused”);//if navvar is equal to 1 the button will look like its on  
}  
else if (navvar != 1){  
this.option1.gotoAndStop(1);// if navvar is not equal to 1 it will be in an off state  
}

When navvar does not equal 1 (my else if statement) should function but at present it does not.

Is my code okay or?

Any help would be great.
