Hey folks, so I am currently having some issues with the dictionary and I can't seem to find anyone else with this problem.
Goal: I want it so that when you click on an object (objects I've grouped into a family called "Commentables" and that each have two variables: a string called DictionaryName and a number called MessageNumber), a text appears with a message from the dictionary with the key being a combination of DictionaryName and MessageNumber.
IE: DictionaryName = TB_Hoop_, and MessageNumber = 0.
When the dictionary goes to get the text (in the Value column), the MessageNumber increases by one, allowing for multiple clicks to provide different text to be shown about that object.
So here's the sequence:
Click on object
Text becomes Dictionary.Get (DictionaryName+MessageNumber)
Increase object's MessageNumber by 1 (for the next click)
So my problem is this:
For about 40% of the objects this works fine.
For the other 60% percent, what happens is that the very first message plays fine, but upon the increase of MessageNumber, the text doesn't become the Value, it becomes "0".
I have checked every name a hundred times and cleared any spaces or line breaks to ensure there is not an error in the Key getting mislabelled, I've even changed the Keys to other names to test it and those work fine, I've compared the objects between the ones that work 100% fine and the ones that don't and there's hardly any difference (outside of position).
I just don't understand why my dictionary works for some and not others, even though when I change that Key to another name (that DIDN'T work before), it works fine.
Any suggestions? I hate to jump to "It's a bug", but I just have run out of ideas on how to fix the error.
(I'll post some screenshots to the code, too)