I’m trying to create a quick prototype of an application so i decided to use text file based variables. This was an hours work that has turned into a days worth of hassle!!
I just cannot get the else/if statements to work with my variables…
Here is a simplified code that I am trying to use:
myData = new LoadVars();
myData.onLoad = function(){
displaybut();
};
myData.load("variables.txt");
function displaybut(){
if (myData.quest == 1){
trace ("it worked");
}else{
trace ("damn it");
trace (myData.quest);
}
}
This is the text file:
dispp=just some text
&quest=1
This is what it traces:
■■■■ it
1
I don’t understand why it does this! Please help me…