Yes as said above:
You are using an array, which means to get the values in the table it's ordered by 1 and upwards:
so myTable[1] is Bob, myTable[2] is 16 and myTable[3] is male.
if you want to print all values onto a in a list going down use:
for _, v in ipairs(myTable) do
print(v)
end
Imprivate, on 11 November 2014 - 12:23 PM, said:
Bomb Bloke, on 11 November 2014 - 12:16 PM, said:
Let's say you assigned your unserialised table to "myTable" - to get at index 1, you'd refer to myTable[1]. Eg:
print(myTable[1])
f = fs.open("2", "r")
myTable = f.readLine()
f.close()
print(myTable) -- prints the table in 1 line
print(myTable[1]) -- prints a blak line
Just prints a blank line.
This is because you haven't made the text a string...
This should be:
{1.0="Bob", 2.0=16, 3.0="Male"}