So I have a dictionary for each level and the level's name. For example, key 0 has a value of "Jungle," key 1 has a value of "Castle," etc. I want to display both of these things in a textbox on-screen, so I use this:
(LevelNumber is a global variable)
For textbox, set text to:
"Level" & LevelNumber & "-" & dictLevels.Get("LevelNumber")
This works fine except that the "Get" portion just returns 0 (because there is no key with the name "LevelNumber," I understand this part). I want the "Get" value to choose the value for the key that is currently equal to the global variable LevelNumber, but because the key is a string, I'm having trouble figuring out if there is a way using str() or int() to get this done.
Long story short, when it's Level 3, for example, the global var "LevelNumber" will always be 3, and I want the text to "Get" the value for Key entry #3 and display that too.
Thank you!