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

Table From User Input

Started by campicus, 17 November 2013 - 10:57 PM
campicus #1
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 on 17 November 2013 - 10:59 PM
Lyqyd #2
Posted 17 November 2013 - 11:59 PM
Put name in brackets: [name] = {id = ID, etc.