Error: Select list item: Attempt to get item number 1 of a list of length 0: []

Hello! Making the step-by-step of this video: https://www.youtube.com/watch?v=_-_ZQJcX9qQ
When you click on the button to take a picture, the following message appears:

Please can someone help fix this little error?

My source code.
Sorry for the variable names is in Portuguese language. It is my native language.
But you can understant what I did.

4a9e919b83e863ad0e71a253afa54937c4fea35a_2_690x313

Only take a picture from the list if the list is not empty.
See the marked up blocks image.

2 Likes

Hello, please, why did you mark the script code: "then set global indiceAtual to 1"?
You can see on YouTube video: Tour Guide Part 4 - YouTube , that I made exactly what the teacher of the video explained.
What changes is the variables names that I translated to the portuguese language.

Can you help me, please?

It is not marked , it means you have to move block inside if ..then statement

Your blocks

image

Correct ones

image

2 Likes

Perfect! It is solved. Thank you very much :blush:
Both the answers are right, and the website only offers to choose one answer that is considered the Solution.

1 Like

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