io:47: Unsupported Format at me.
Here's my code:
local w,h = term.getSize() local key = "1234567890" local 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 = fs.read("*1") i = i + 1 end file:close() return lines end return {} end function replaceLine(path, n, text) local lines = getTable(path) lines[n] = text writeFromTable(path, lines) end function fWrite( path, text ) local file = config fs.delete("path") fs.open("config", "w") replaceLine("config",1,"Code: "..key) fs.close() end fWrite()
Help would be much appreciated. This is not my code so don't facepalm at me .
~kaioo1312
EDIT : Found http://www.computerc...-with-an-error/
which someone had a the exact same problem with the same code. Lyqyd pointed out that ("*1") is not valid but ("*l") is. Apparently it is there is no difference between l and 1 in Sublime Text 3. Fixed my own problem. Thanks Lyqyd!
~kaioo1312
Edited by kaioo1312, 01 January 2015 - 03:32 AM.