From ec797297e06ed10c458ea21be904ff82c715fe9f Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 15 Jun 2025 19:12:57 -0700 Subject: [PATCH] Fix issue with refresh login --- Assets/Scripts/AccountMenu/AccountRefreshLogin.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs b/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs index 5db754c..70259c0 100644 --- a/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs +++ b/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs @@ -59,9 +59,17 @@ public class AccountRefreshLogin : MonoBehaviour { AccountHandler.UpdateStatusText(refreshLoginStatusText, "Incorrect username or password", Color.red); } - else if (response == "1") + else if (response.Split(":")[0] == "1") { + string[] array = response.Split(':'); + string session = array[1]; + string userName = array[2]; + int userId = int.Parse(array[3]); + PlayerPrefs.SetString("gameSession", session); + PlayerPrefs.SetString("userName", userName); + PlayerPrefs.SetInt("userId", userId); AccountHandler.instance.SwitchPanel(0); + AccountHandler.UpdateStatusText(refreshLoginStatusText, "", Color.red); } else {