playMaker

Author Topic: Has Array List (Reference)  (Read 2662 times)

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Has Array List (Reference)
« on: November 16, 2013, 03:04:27 AM »
Hello,

I'm using arraymaker for a grid, and i have a number of arrays that correspond to a row. The size of the grid can change and when the grid is created, it will create a new array for each row with the rows number. When searching the area around a player, i need to check the rows above and below, and i would like a failure event incase it calls eg. row 11 (array list with reference "11") on a 10 row array. At the moment when i try to Get from an array that doesn't exist, I get just get a huge error and it doesn't call the Failure event. That is just for Failures getting the specific variable from an array and now a failure trying to access the array itself, i guess.

Would anyone have any action for this?

Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Has Array List (Reference)
« Reply #1 on: November 18, 2013, 02:06:21 AM »
Hi,

 For this, insert an initial check with to compare the number of items and the index you want to get. Use the actin "ArrayListCount" for this.

bye,

 Jean