From 0d7e8ef1025cf01b348263da93aeeee8479539fc Mon Sep 17 00:00:00 2001 From: Astoria Floyd Date: Wed, 11 Aug 2021 19:27:35 -0500 Subject: [PATCH] Minor change to how mode is stored. --- API/tools.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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()