This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Noodle's profile picture

"Dynamic" Variables

Started by Noodle, 16 September 2012 - 08:23 PM
Noodle #1
Posted 16 September 2012 - 10:23 PM
Minor question..
Down = {}
Down[1] = "lol"
var = "Down"
print(var[1])
If you can read that code.. I basically want to have var refer to the table?
Any possible way of doing this without a conditional?
Lyqyd #2
Posted 16 September 2012 - 10:24 PM
That code would be fine if you took the quotes around Down out.
Noodle #3
Posted 16 September 2012 - 10:25 PM
That code would be fine if you took the quotes around Down out.
Thankyou very much! I've been trying to find this out alllll day.