Find the for loop index too large : (Select list item : Attenpt to get list item no. 2 of list of length 1?

Screenshot_20240112-123313_Chrome

Check the length of the lists. You are trying to get the second item in a list of one item .

Pay attention to the block length, you are using a text block that get the length of the text inside the variable z . If the variable is a text you will get a number , also variable y will be a number to use the math block <

Probably you have to understand what is a text and what is a list and use the right block

Can you explain what you are trying to achieve?
I read your blocks, but not understand the purpose of these blocks.

How to add app icon in code.mit app inventer?


The operation length of list cannot accept the arguments: ,["0"]
Why?

global z is not a list


Please solve this error:
Error in Runtime: attempt to get list item no.2 of list of length 1(or 3 or 5....)

You need to simplify and debug yourself. Look at the contents of each of your lists. You do not show these. Are they long enough to match the criteria you set in your for each/from to event ?

It may also be better to not store a value of . in any of your lists, use something more meaningful (e.g. 0/1 or true/false)

Use Do It on every block to trace the value of everything.FAQ Section: Debugging

But it is not a matter of need it is of checking the cost value has . or not (i.e. true or false) in the variable cost

What is do it? I don't know it's use

http://ai2.appinventor.mit.edu/reference/other/testing.html