Help with Inside:Error expecting list but getting text


image
After using the remove variable block once, it encounters a bug and the program stops. I don't know how to solve this.

Try this out as a safer way of deleting an item in a list and see how it goes
image

Thank you for trying to solve this. I tried a similar script yesterday but for some reason Snap only allows me to remove an item from the list when I use "for i."

Could you share your project so that we don't have to remake from the pictures?
You go to the 'your projects' page, find the project, then click share, and paste the link here.

Removing the elements of the list during iteration is like sawing a branch you are sitting on...
BTW: "gaming" is a list of lists?
Maybe a built-in primitive can be used.
untitled script pic (49)

If there are no duplicates...
untitled script pic (50)
or with duplicates...
untitled script pic (51)

My issue was solved although if you are still interested here is the link https://snap.berkeley.edu/snap/snap.html#present:Username=williamz26&ProjectName=Project%202Test

Thank you for the assistance.

Another solution with duplicates is to go from the length down to 1. In that case, the if-else can be replaced with if.

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