# Too easy?

**URL:** <https://forum.kirupa.com/t/too-easy/193670>\
**Category:** Uncategorized\
**Created:** [July 14, 2006, 9:46pm UTC](https://forum.kirupa.com/t/too-easy/193670 "2006-07-14T21:46:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![olympiakos7](https://avatars.discourse-cdn.com/v4/letter/o/278dde/32.png) [@olympiakos7](https://forum.kirupa.com/u/olympiakos7)\
**Post date:** [July 14, 2006, 9:46pm UTC](https://forum.kirupa.com/t/too-easy/193670/1 "2006-07-14T21:46:57Z")

</div>

I’ve been banging my head trying to get this to work, it seems soooooo simple

basicaly I’m loading a variable from the .txt file, and it loads fine, but where I’m having trouble is the second part with my if statements. no matter what the variable is, it always traces “ont-ok” ie if my variable in the text file is “ma” my output window shows-  
ma  
“ont-ok”

instead of-

ma  
“ma-ok”

```auto

myVars = new LoadVars();
myVars.onLoad = function(success) {
	if (!success) {
		trace("Failed to load");
	} else {
		myVariable1 = myVars.prov;
		trace(myVariable1)
    
}
if(myVariable1 = ont){
		trace("ont-ok")
	}
	else if(myVariable1 = ma){
		trace("ma-ok")
	}
	else if(myVariable1= bc){
		trace("bc-ok")
	}	
	

 }  
	myVars.load("mapid.txt");

```

I’m sure it’s extremely simple but I’m just over looking something.

thanks in advance.
