diff --git a/API/tools.lua b/API/tools.lua index 672f11e..b48df19 100644 --- a/API/tools.lua +++ b/API/tools.lua @@ -36,12 +36,11 @@ end --Sets mode function tools.setMode(mode) - local file = io.open("./docs/mode", "r+") - io.input(file) + local file = io.open("./docs/mode", "w") io.output(file) file:seek("set", 0) if mode == "test" then - file:write("'test' ") + file:write("'test'") elseif mode == "normal" then file:write("'normal'") else @@ -52,7 +51,7 @@ function tools.setMode(mode) end function tools.getMode() - local file = io.open("./docs/mode", "r+") + local file = io.open("./docs/mode", "r") io.input(file) file:seek("set", 0) local mode = file:read()