TSet.Remove by index documentation is wrong

Here’s the official documentation on TSets.

The docs say:

Elements can be removed by index with
the Remove function, though this is
recommended only for use while
iterating through the elements:

 FruitSet.Remove(0);  <-- will remove the first item.

So there is no way to differentiate between using an index or using an item.

Ok. Now here’s the problem: What happens if your TSet contains int variables?.

Set.Remove(5) will remove item 5 or find which item contains the int “5” and remove it?

I tested this, for those who are curious.

Documentation is still unclear and I think It should be fixed.

.remove(5) will remove items with an “int 5” inside, no matter which index. In fact, it doesn’t remove the item on index 5.

1 Like