Jump to content




"Dynamic" Variables


  • You cannot reply to this topic
2 replies to this topic

#1 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 16 September 2012 - 09: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?

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 16 September 2012 - 09:24 PM

That code would be fine if you took the quotes around Down out.

#3 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 16 September 2012 - 09:25 PM

View PostLyqyd, on 16 September 2012 - 09:24 PM, said:

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.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users