Does the ‘for’ loop, loses it’s variables and/or results, as function() does when finished? If so …
Lets say I have a function that accepts two parameters, and returns one, and I want to save the values of numorus results in variables, so logicly I create a for loop, and save it to an array. But here’s the problem, I think that the array gets lost when the for loop ends, because after the ending }; the array doesn’t exist anymore.
The code was ok, but I wanted to enchance it further, so that I wont have to write mConstruct(0, jan); mConstruct(1, feb); x12 to create arrays that I can later access. I know that I could make this far much simpler and faster, but I want to learn flexible scripting, not hardcoding data in the code.
The code up to run() works. Run as is doesn’t work as it supposed to. The function should create 12 arrays accessible from _root. But I can’t access them from enywhere else than the run function itself.