I have this for loop:
for (var i in jsMonsters) {
Debug.Log(jsMonsters*);*
*}*
*```*
*<p>Which gives me this error message:</p>*
*<blockquote>*
*<p>InvalidCastException: Cannot cast from*
*source type to destination type.</p>*
*</blockquote>*
*<p>Can you explain why that is happening?</p>*
*<p>Thanks - Elliot Bonneville</p>*
*<hr>*
*<p>Also, so I don't have to edit my Question with more information later, here's what populates the array:</p>*
*```*
*function ReadFile () {*
*var sr = new StreamReader(Application.dataPath + "/" + readFilePath);*
*var fileContents = sr.ReadToEnd();*
*sr.Close();*
*var monsters : String[] = fileContents.Split("-"[0]);*
*var jsMonsters = new Array(monsters);*
*}*
*```*