I have a .json file that I am using to have data for each level. I have an array in the .json file that i need to loop through the data for a level to generate it, except when i use this:
for(i in leveldata){
loadLevel(levelData[i]);
}
it gives an error saying You can't iterate on a Dynamic value, please specify Iterator or Iterable
I read a lot about iterators/iterables, but yet can’t figure out what it means
George, this macro trick would be a great addition to code.haxe.org.
If you don’t put it there, I’ll do it (if ok for you - all credits to you, of course!).
Hey @cambiata, I’ll make a PR now – to save time it will be pretty much the post as-is with some minor tweaks but feel free to change anything to make it work better for the site