v0.63 -> v.077, Arrays work differently now?
Monkey Forums/Monkey Programming/v0.63 -> v.077, Arrays work differently now?
| ||
Hi all, First time posting here and I'm afraid it's about a problem. Essentially I have a bit of code that worked perfectly with Monkey 0.63 but throws an "Array index out of range" error in v.0.77, both when run as HTML5 and Destktop application. Here's the bit of code in question: ----------------------------------------------------- Function LoadAnimData(Character:String) Local TxtFileContent:String Local lines:String[] Local line:String Local values:String[] Local subvalues:String[] TxtFileContent = LoadString(Character +".ini") lines = TxtFileContent.Split("~n") For line = Eachin lines values = line.Split("=") subvalues = values[1].Split(",") AnimMap.Set(values[0], subvalues) <--- ERROR TRIGGERED HERE Next End ----------------------------------------------------- It simply reads data from a .txt file and stores in an array; For some reason it goes boom on the line I marked out. I'm sure the problem must be something really basic, but for the life of me I can't figure it out. Thanks in advance! |
| ||
Nevermind, there was a problem with the .ini file. |
| ||
But it still worked in v63? |
| ||
Silly me...I needed to delete the v77 build folder as it wouldn't compile over the old version; Doing so, I forgot to edit the config file and include *.ini in the filew copied over from "data". I kid you not, I wasted an entire afternoon because of this silly oversight :D |
| ||
We've all been there :) |