I am trying to figure out a way to do the following:
I have MANY tables, each containing a total of 5 strings. The strings are put onto buttons. When the button is pressed, it takes you to a new set of buttons, whose labels I want to be pulled from a table, whose variable name is equal to the name of the string whose button you pressed. I am trying to avoid having to make thousands of different buttons, and instead make a single button function that generates new buttons based on the table it selects.
Is there a way to call a variable, based on a string that matches it’s name exactly?
Basically, how I set it up originally, was there’s a currentTable, and when you select a button, it changes the currentTable variable to match the string connected to the button you press, however I absent mindedly failed to realize that I was not reassigning a table to my table variable in this process, but rather a string that was the equivalent of my variable name.
I hope that makes sense. Basically, is there a way to take a string such as “Food” and use it to call a table named Food, and assign it to my currentTable variable? [import]uid: 197365 topic_id: 35686 reply_id: 335686[/import]
