From 48cfeb09605a78f449b2792f314576d2865a0265 Mon Sep 17 00:00:00 2001 From: Ale2610 Date: Sat, 29 Aug 2015 16:17:03 +0200 Subject: [PATCH] Update sPhone.lua --- src/sPhone.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/sPhone.lua b/src/sPhone.lua index 1c8c640..552c1ff 100644 --- a/src/sPhone.lua +++ b/src/sPhone.lua @@ -496,14 +496,15 @@ local function kernel() if rServer ~= "Success!" then print("Username already exists") print("Retry later in the app sID") - sleep(1) + sleep(2) + else + local f = fs.open("/.sPhone/config/username","w") + f.write(name) + f.close() + local pwf = fs.open("/.sPhone/config/.sIDPw", "w") + pwf.write(base64.encode(pw)) + pwf.close() end - local f = fs.open("/.sPhone/config/username","w") - f.write(name) - f.close() - local pwf = fs.open("/.sPhone/config/.sIDPw", "w") - pwf.write(base64.encode(pw)) - pwf.close() else term.setBackgroundColor(colors.white) term.clear() @@ -536,8 +537,11 @@ local function kernel() end end end - + term.setCursorPos(1,13) + term.clearLine() sertextext.center(13," All Set!") + term.setCursorPos(1,14) + term.clearLine() sertextext.center(14," Have fun with sPhone") sPhone.user = name sleep(2)