# If statements help

**URL:** <https://forum.kirupa.com/t/if-statements-help/204095>\
**Category:** Uncategorized\
**Created:** [October 17, 2006, 2:54am UTC](https://forum.kirupa.com/t/if-statements-help/204095 "2006-10-17T02:54:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)\
**Post date:** [October 17, 2006, 2:54am UTC](https://forum.kirupa.com/t/if-statements-help/204095/1 "2006-10-17T02:54:51Z")

</div>

here is my problem i have a function called score which works fine and adds 1 to the score…yet what i want is when oen of my radio component buttons is clicked i want the function to play function score and add 1 to the score and just simply goto the next frame.

here is my code:

```auto
function(){
    if(q1a2.selected = true){
    score();
    _root.gotoAndStop("q2");
} else {
_root.gotoAndStop("q2");
}
}

```

when i play it does nothing and doesn’t add 1 to the score

cheers in advance 🙂
