# Super easy variable question

**URL:** <https://forum.kirupa.com/t/super-easy-variable-question/257492>\
**Category:** Uncategorized\
**Created:** [April 14, 2008, 6:03pm UTC](https://forum.kirupa.com/t/super-easy-variable-question/257492 "2008-04-14T18:03:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Slausen](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Mr\_Slausen](https://forum.kirupa.com/u/Mr_Slausen)\
**Post date:** [April 14, 2008, 6:03pm UTC](https://forum.kirupa.com/t/super-easy-variable-question/257492/1 "2008-04-14T18:03:41Z")

</div>

Easy for you…but I’m dumb. So I’m working on a game, where if you click an answer, it will double check to see if that’s the one you really want. So I tried to set a variable when that button is clicked. On another set of buttons, I placed an if / else statement, but it doesn’t seem to be working. I’ll post the code, and you tell me if I’m even remotely close. Which I’m probably not. Thanks.

Button 1:

on (release) {  
//ser variable of right answer  
answer = “correct”;  
trace(answer);  
}

Button 2:

on (release) {  
if ( answer = “correct” ) {  
gotoAndPlay(2);  
} else {  
gotoAndPlay(3);  
}  
}
