How can I do it? Waht blocks do I need to achieve this? I'm still learning about the MIt since I just learn this for a couple of month now and focus on the project so I'm still learning.
After using it this is the error I'm getting
After using what? in my example there is not a "select list item" block.
What I mean when I use the example blocks you gave, there's an item in the list that would stay that's why when I go back to the cart screen this error would pop up since it's trying to get an items in the list.
share here how you have added the blocks of the example to your code
why userData2? you were reading from tinyDb and store it into a "list" variable and then removing from that "list" and storing it again. Do the same, with "list" but instead of remove the fixed index, get the index with that blocks, and then remove it.
Then store "list" again.
The list is where the user purchase would save, and the userdata2 is where the index I'm trying to remove. I can't follow instruction I'm sorry since Im still confuse to what i need to use.
These are the deletions which were failing due to the fixed index:
there is not a userData2....you have a variable "list". And you are trying to remove the index 1 from that list. After that, you store the "list" again.
Do the same, but instead of delete a fixed index (which doesn't work), you need to calculate the index of the element. For that, you can use the productName you want to remove like in the example.
I just fixed it, since the system always change the 1st index to another after it's delete. So i did is every time user select one item it would delete 1st index x the number selected my user. if user select 8 items, then system would remove 8 1st index and it work. no more error and it's working fine even if I select all items it work fine now. thank for you help everyone