Posted 10 August 2012 - 11:38 PM
for _,file in ipairs( fs.list("/accounts") ) do
h = fs.open( file, "r" )
print( " - " .. file .. " : " .. h.readAll( ) )
h.close( )
end
The issue stems on line 3 apparently, yet I don't see any obvious problems there… and LUA debugging isn't as nice as any other language and tell me the column, or the actual method causing the error… nor could I find any way to produce any sort of stack trace; so if anyone knows how to do any of these things I would be grateful.
1. Yes a folder called accounts in / exists on this computer, and has files in it.
2. The code itself, including the retarded and unexplained _,file bit is copied from another thread on this site, apparently one in which the code worked for other people.
This should produce a list as follows:
- boxxy : filecontents
- cbroughton : filecontents
Instead it does this:
http://i.imgur.com/oNlov.png
Any help would be appreciated