humanReadableWord is declared at the top of the file and works. I can print it and I get a string. I’m able to print the array with allWords just fine. I can pull from the array. I can print this.humanReadableWord with no problem but I can’t compair them for some reason… I think.
var humanReadableWord : String;
function Update(){
var selectedLetters = GameObject.Find("SelectedLetters").GetComponent(SelectedLetters);
var currentWordInProgress = selectedLetters.selectedLettersArray;
this.humanReadableWord = (currentWordInProgress).Join("");
}
function ValidateWord(){
var linkToDictionary = GameObject.Find("Dictionary").GetComponent(Dictionary);
var allWords = linkToDictionary.dictionaryWords;
var currentWord = ""+this.humanReadableWord;
for (var i = 0; i < allWords.length; i++) {
// print(this.humanReadableWord); <--Works
if(allWords *== currentWord){*
print(“testing!!”);
}
}
}
I have a call to the function below this that I also know is working…