So I have a function that checks if in item exists in the character’s inventory. Every item is a structure with two variables: a title (string) and thumbnail (texture) So what the function does is that it takes a string parameter, compares it to the title variable of every single item I have. If it finds one, it returns a true value. This part work fine.
But then I also want to return a value of the entire structure that just matched its title variable (so I can later remove
it from the inventory) Here’s what I have so far.
It works, but here’s the problem. If I enter “wood” into the input parameter. And say I have two items with title variable of “wood”. Then I try to use the “item all” output to remove the wood item, it removes every single item with variable title of “wood” instead of just one. Any ideas on how to make it only return just one item structure (the one which title variable matched the input string)? I would really appreciate it, i’m completely stuck.