How do I get the maximum Index number of a list?

Hello.
What I'm trying to do is to get the maximum index from a list.


As you can see, inside the If statement, is empty.

I'm trying to move from Index 1 to 2 to 3 and so on, in a way that when the user has reached all the way to the max of the index in a list, it will go all the way back to index 1.

And of course, the user can add items to the list so the number of the index may vary.
Thank you.

hmmm i think this is the solution...


I'll wait until tomorrow to see if there's no problem with it to mark it as the solution.

try the length of list block
http://ai2.appinventor.mit.edu/reference/blocks/lists.html#lengthoflist

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

3 Likes

Yup that's the solution.
I love that you always answer and help!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.