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

Saving a variable as a variable

Started by mrpoopy345, 23 January 2014 - 04:46 PM
mrpoopy345 #1
Posted 23 January 2014 - 05:46 PM
So, I am making an API, and what I want to do is have the player input a name as table arguements

function test(name)
But then I want to save what ever he inputted as "name" as the name of a table.
Any help?
(I have no current code)
CometWolf #2
Posted 23 January 2014 - 05:54 PM
Should be easy enough

local tNames = {}
function test(name)
  tNames[name] = {}
end
mrpoopy345 #3
Posted 23 January 2014 - 06:00 PM
Thanks!