# What's wrong with this script?

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-this-script/189481>\
**Category:** Uncategorized\
**Created:** [June 2, 2006, 11:17pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this-script/189481 "2006-06-02T23:17:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpdematteo](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@gpdematteo](https://forum.kirupa.com/u/gpdematteo)\
**Post date:** [June 2, 2006, 11:17pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this-script/189481/1 "2006-06-02T23:17:32Z")

</div>

Hi,

I can’t figure out why this won’t work. I’m using Flash MX 2004.

[COLOR=navy]term = “sodapop”;

function testEquality() {  
answer = String(solveGuess.text).toUpperCase();[/COLOR] [COLOR=slategray][//solveGuess.text](https://solveGuess.text) is an input field, I typed sodapop into it[/COLOR]  
[COLOR=navy]puzzle = term.toUpperCase();[/COLOR]

[COLOR=navy]trace(answer);[/COLOR] [COLOR=slategray]//you get SODAPOP[/COLOR]  
[COLOR=navy]trace(puzzle);[/COLOR] [COLOR=slategray]// you get SODAPOP[/COLOR]

[COLOR=navy]if (answer == puzzle)  
{  
trace(“yes”);

} else {  
trace(“not working”);[/COLOR] [COLOR=slategray]//this is the trace I get but doesn’t answer equal puzzle?[/COLOR]  
[COLOR=navy] }[/COLOR]  
[COLOR=navy]}[/COLOR]

[COLOR=navy]btn\_Check.onRelease = function() {  
testEquality();  
}[/COLOR]

Where am I going wrong?  
Thanks a lot!
