t = {fs.list(path)}
for i = 1, #t do
print(t[i])
end
doesn't return what i want
list
Started by SpencerBeige, Feb 14 2015 04:51 AM
5 replies to this topic
#1
Posted 14 February 2015 - 04:51 AM
#2
Posted 14 February 2015 - 04:59 AM
I believe fs.list returns a table. So basically you're seeing t[1] being a table.
t = fs.list(path) for i = 1, #t do print(t[i]) end
#5
Posted 14 February 2015 - 02:06 PM
It's not the same code you wrote. What you are doing in your code is putting all return values of fs.list into a table, which you then save to a variable. What Dragon53535 is doing is putting the first (and only) return value into a variable. fs.list return a numerically indexed table, so there is no need to put it into another table.
#6
Posted 14 February 2015 - 02:16 PM
ohhhhh ok
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












