How come there is no warnings in the app making process, but there's error in the simulator?

I am making an app which can save vocabularies. When a vocabulary is saved, a fruit icon will show up in a tree. I am using the imagesprit and list to make it. There's no warnings in the process of making the app in the APP INVENTOR, but when I put the app in the simulator. There comes the application problem when I'm going the save the word. Can someone tells me where's the mistake in my app?Thanks.

How can tree3 be a list and a sprite at the same time?

This is how App Inventor operates; perfectly normal.

From the blocks you have shown us, there seems to be an issue in the list indexing in the ImageSprite.Picture block. In that case, check the content of the list.
Of course, the error could stem from another part of your code. Please share all of your blocks.

Picture 1 means setting 4 variables which are the lists consist of 5 imagesprites each. I'm making the app that can save 4 categories of vocabularies at the same time. Each category can save 5 vocabularies at the same time.

Picture 2 shows the process of setting the name of each category.

Picture 3 and 4 shows the process of saving vocabularies in each category. It is set that if any picture of imagesprit is not an apple or orange(means there's no picture on the imagesprit), the imagesprite can save new word.

Picture 5 means after saving the words. The word in the symbol of an apple in a tree can be removed by doing the test.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

Final_copy2 (1).aia (33.9 KB)

This is the file, and I think the problem may be in the process of saving words. Thanks for helping me to find the problem.

Multiple errors:

(this appears in Button_voc_1.Click, Button_voc_2.Click, Button_voc_3.Click, and Button_voc_4.Click)

Also, indexing in App Inventor starts from 1. So, inputting the indexes as 0 throws another error.

You are also using a list as an index.
This appears only in Button_voc_2.Click

1 Like

Thank you! I will fix these errors.

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