playMaker

Author Topic: Array List Get Next Question  (Read 361 times)

Wayne191

  • Playmaker Newbie
  • *
  • Posts: 27
    • View Profile
Array List Get Next Question
« 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.
« Last Edit: August 10, 2017, 07:15:54 PM by Wayne191 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13401
  • Official Playmaker Support
    • View Profile
Re: Array List Get Next Question
« Reply #1 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

Wayne191

  • Playmaker Newbie
  • *
  • Posts: 27
    • View Profile
Re: Array List Get Next Question
« Reply #2 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! :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13401
  • Official Playmaker Support
    • View Profile
Re: Array List Get Next Question
« Reply #3 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