playMaker

Author Topic: Array List Contains Count [Solved]  (Read 711 times)

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Array List Contains Count [Solved]
« on: November 21, 2020, 09:02:00 AM »
Array List Contains Count if used lets me know how many of those variables are in my list.

How do I iterate through the list of strings and get the index that those variables are at?

Everything I try seems to return only the first index (which is 0) each time. It seems like Index Of never goes past 0.

I've included an image below to help better illustrate.
« Last Edit: November 21, 2020, 10:52:59 AM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Array List Contains Count
« Reply #1 on: November 21, 2020, 09:46:55 AM »
Hi.
The Array list Contains Count has a count result but it seems its not to be used.

But i think you should do this instead :

State 1 :
Array Get Next (store variable and index)

State 2 :
String compare :
if true : add to the 'whatIndex' and go back to state 1
if false : back to state 1

if you need a count :
before array get next do a 'Set Int Value' and set the 'Count' Variable to 0

The do a Int Add (1) in state 2

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: Array List Contains Count
« Reply #2 on: November 21, 2020, 10:52:40 AM »
djaydino, You are the man!
THANK YOU!

The way you did it makes so much more sense :) This was the final part of the anagram checker and Im so happy (I even have loops inside of loops, which is crazy!). Thank you my friend!
Have I said how much I love playmaker!!! This is one amazing tool