Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: Wayne191 on August 10, 2017, 07:08:56 PM

Title: Array List Get Next Question
Post by: Wayne191 on August 10, 2017, 07:08:56 PM
Hi,

I am trying to loop through and perform actions in an array list. Start Index is 0 and End Index is a variable in this case. How can I perform actions one time only for the index 0 item? If the Start Index is 0 and End Index is 0, it's doing an infinite loop. If the Start Index is 0 and End Index is 1, it performs actions on Index 0 and Index 1 items which I only want to perform actions on Index 1 item.

How should I achieve this?

Thanks.
Title: Re: Array List Get Next Question
Post by: jeanfabre on August 11, 2017, 12:42:11 AM
Hi,

 uhm, yes, this is problematic, we never accounted for the case you want to only iterate through the first item... Good point!

Ok, so to avoid breaking changes with existing project, I updated ArrayGetNext2 which will now work properly, the change is that you have to set start and end to none for it to default to 0 and array length, if you set start and end to 0 it will iterate to the first index and done.

so get ArrayGetNext2 for your case.

Let me know how it goes.

Bye,

 Jean


 Bye,

 Jean
Title: Re: Array List Get Next Question
Post by: Wayne191 on August 14, 2017, 03:13:53 AM
Hi Jean,

I tested it and it works great. Would it be possible to add the same functionality to Array List (under ArrayMaker/ArrayList tab) as well?

Thanks a lot for your help! :)
Title: Re: Array List Get Next Question
Post by: jeanfabre on August 15, 2017, 12:50:51 AM
Hi,

They expose the same issue right?

Please bump me end of the week, I'll have a go at it yes.

 Bye,

 Jean