Download

Problem with removing an element from an array

So I’m trying to create a trade system, all items are stored in an array of structs. I have 2 widget BPs and each time I click on a button (All items), there is a loop that adds each item to a scroll box.

The problem is when I try to buy an item (remove it from the array). I do so by clicking a Buy Now button and the item is indeed removed from the array. However, only the current item is removed, and the array is not updated with the previous removal. Furthermore, when I click on the All button, it shows all items again.

Does anyone have an idea why this happens?

Create_widget.png

bc9019fe3c9eadd124d59cacb8549f0a394be1da.png

32c0c7b941fe0a6d1653cb580a3e7b0bb9105f0d.png

7c1e71d03be6f35223bcc131d0a0df0aa0afa3cb.png

Thanks in advance.

For some reason, the problem is that I’m removing the item from the child BP. If I remove it from the parent BP (where the array is defined), it works correctly.