Jump to content




Table From User Input


  • You cannot reply to this topic
1 reply to this topic

#1 campicus

  • Members
  • 164 posts

Posted 17 November 2013 - 11:57 PM

Ok, so I want to get 3 bits of user input, such as:

name = io.read()
ID = io.read()
sort = io.read()

how do I make a table like this from that data?

t = {
name = {id = ID, destination = sort,},
}

thanks guys!

Edited by campicus, 17 November 2013 - 11:59 PM.


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 17 November 2013 - 11:59 PM

Put name in brackets: [name] = {id = ID, etc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users