From c20170a0a349866556e2c107d6f107131429c8b4 Mon Sep 17 00:00:00 2001 From: xomf Date: Fri, 6 Jun 2025 04:38:54 +0000 Subject: [PATCH] Update eCash.lua --- eCash.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/eCash.lua b/eCash.lua index 9d587d2..86dbfaa 100644 --- a/eCash.lua +++ b/eCash.lua @@ -243,21 +243,16 @@ local loginButton = login:addButton() username = usernameInput:getText() - if not fs.exists("/.usrcache") then - local file = fs.open("/.usrcache","w") - file.write(username) - file.close() - end - login:setVisible(false) appFrame:setVisible(true) refresh_ui() end) -if fs.exists("/.usrcache") then - local file = fs.open("/.usrcache","r") - local username = file.readLine() +if fs.exists("/config.json") then + local file = fs.open("/config.json","r") + local file_content = file.readAll() + local username = textutils.unserialiseJSON(file_content).username file.close() usernameInput:setText(username) end