# Global variable?

**URL:** https://forum.kirupa.com/t/global-variable/139755
**Category:** Uncategorized
**Created:** [March 5, 2005, 9:00am UTC](https://forum.kirupa.com/t/global-variable/139755 "2005-03-05T09:00:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yossarian](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@yossarian](https://forum.kirupa.com/u/yossarian)
#### Post date: [March 5, 2005, 9:00am UTC](https://forum.kirupa.com/t/global-variable/139755/1 "2005-03-05T09:00:08Z")

</div>

I’m trying to define my code somewhat but I’m not very successful. I was hoping that someone could give me a hand?

Have a few input boxes where users have to add text to answer question. In my code so far, they have to click a button for each question to see if they are correct

```auto
n (release) {
	_root.comment1 = "";
	if (_root.input1 == "her") {
		_root.comment1 = "Correct";
	} else {
		_root.comment1 = "Wrong";
	}

```

and then the same code over and over again…does anyone know a way I can create a handy little function to solve this problem?

Any help would be appreciated! 😏

Y
