I have a sequence of conditions and actions that work without any problem in a group. But when duplicated for use in a function it doesn't.
<img src="https://dl.dropboxusercontent.com/u/57755595/pics/functionArray.jpg" border="0" />
The issue lies with the 'for each' loop that is highlighted in the screenshot.
-In the 'makeDecks' function that preceeds it, I create the classic_back objects.
When fetching the UID's it is as if no classic_back object exists although the debugger shows there are 52.
The card array stays empty (1,1,1), and when I trace the UID values to a textfield it stays empty. When I add a 'pick all' condition prior to the 'for each'...empty.
No return value whatsoever. No "0", no "-1".
When I execute the exact same sequence in a group, and activate/deactivate it as if I would call the function it works like a charm.
Any idea what am I overlooking here?
In what way is there a difference between a group or function?
Could this be a scope issue? Seems unlikely since I created many other functions that use 'cardArray' and other arrays and those work just fine.
Or does the 'for each' execute while the makeDecks() function is still running? Seems unlikely too.
I can use a group to circomvent the problem, but I'd prefer not to.
Stumped... <img src="smileys/smiley5.gif" border="0" align="middle" />