Hi, I’m trying to figure out why an item in an array is being called instead of the intended one.
When a player presses a button it will add the name off that button as an item in an array.
When a player presses a button to remove that item from the array it will check the index, and within the index runs a contains with the items name. If true it will then remove that index.
I have a system where each item adds points when you click them. then when you remove them it takes away that same amount of points.
My problem is the two items in the array have very similair names as they as the same character but with a certain item. So currently one is called “Tzaangor Enlighted” (90 points) and the other is “Tzaangor Enlightened (On Disc)” (210 points)
When trying to remove the version of the disc is will remove the index, however it will only take away 90 points instead of the 210 that it should. Therefore it’s calling the action for the non disc version first.
Is this because the name both start the same? Is there a way I can do this without changing the name?
many thanks