# Wrong string displaying

**URL:** <https://forum.kirupa.com/t/wrong-string-displaying/16938>\
**Category:** flash\
**Created:** [March 30, 2003, 1:23pm UTC](https://forum.kirupa.com/t/wrong-string-displaying/16938 "2003-03-30T13:23:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cturner](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@cturner](https://forum.kirupa.com/u/cturner)\
**Post date:** [March 30, 2003, 1:23pm UTC](https://forum.kirupa.com/t/wrong-string-displaying/16938/1 "2003-03-30T13:23:30Z")

</div>

I am creating a Noughts and Crosses game with radio buttons, 9 buttons and 9 dynamic text boxes. The code below is on a button that when a player clicks on that button it is suppose to display whichever radio button is selected and the problem is that it displays 0 even when X is selected. See the comments in the code for more information.

```auto

on(release) {
                // checking radio button X is selected
	if (X_rb.getValue()==true) {
                                // displaying X in a text box
		lbl1 = "X";
                                // disabling button after been clicked on
		Button1.enabled = false;
                // if radio button X isn't selected then 0 must be
	} else {
                                // displaying 0 in a text box
		lbl1 = "0";
                                // disabling button after been clicked on
		Button1.enabled = false;
	}
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 30, 2003, 6:30pm UTC](https://forum.kirupa.com/t/wrong-string-displaying/16938/2 "2003-03-30T18:30:57Z")

</div>

did you trace(X\_rb.getValue()); ?  
also, move  
Button1.enabled = false;  
out of the if(){}else(){} to here  
coz it’s executed anyway,  
no need to have it twice…  
and in MX, you should use  
lbl1.text = “X”;  
//not variable, but textfield instance name
