Posted 30 December 2014 - 12:18 AM
I am trying to make an OS and i cant get the load feature to work (to load from another file) im using this function:
but i keep getting an error that says "io :86: Unsupported format" and there is nothing wrong with line 86, because there isnt a line 86 =/ my program only goes up to 62 lines. the chunk of code i use to call the function is
Please help me asap i will keep checking on the website every 10 or 20 mins. Thank you!
function getTable(path)
if fs.exists(path) then
local file = io.open(path, "r")
local lines = {}
local i = 1
local line = file:read("*1")
while line ~= nil do
lines[i] = line
line = file:read("*1")
i = i + 1
end
file:close()
return lines
end
return {}
end
but i keep getting an error that says "io :86: Unsupported format" and there is nothing wrong with line 86, because there isnt a line 86 =/ my program only goes up to 62 lines. the chunk of code i use to call the function is
local config = getTable("AluminOS/config")
The config file is in a folder called AluminOS as you can see.Please help me asap i will keep checking on the website every 10 or 20 mins. Thank you!