diff --git a/Assets/Scripts/AccountMenu/AccountChangePassword.cs b/Assets/Scripts/AccountMenu/AccountChangePassword.cs index 9409ed6..537b676 100644 --- a/Assets/Scripts/AccountMenu/AccountChangePassword.cs +++ b/Assets/Scripts/AccountMenu/AccountChangePassword.cs @@ -52,6 +52,15 @@ public class AccountChangePassword : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); switch (response) { + case "-999": + AccountHandler.UpdateStatusText(changePasswordStatusText, "Server error while fetching data", Color.red); + break; + case "-998": + AccountHandler.UpdateStatusText(changePasswordStatusText, "Client version too outdated to access servers", Color.red); + break; + case "-997": + AccountHandler.UpdateStatusText(changePasswordStatusText, "Encryption/decryption issues", Color.red); + break; case "-1": AccountHandler.UpdateStatusText(changePasswordStatusText, "Internal login server error", Color.red); break; diff --git a/Assets/Scripts/AccountMenu/AccountChangeUsername.cs b/Assets/Scripts/AccountMenu/AccountChangeUsername.cs index a19409c..ac8bf23 100644 --- a/Assets/Scripts/AccountMenu/AccountChangeUsername.cs +++ b/Assets/Scripts/AccountMenu/AccountChangeUsername.cs @@ -44,6 +44,15 @@ public class AccountChangeUsername : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); switch (response) { + case "-999": + AccountHandler.UpdateStatusText(changeUsernameStatusText, "Server error while fetching data", Color.red); + break; + case "-998": + AccountHandler.UpdateStatusText(changeUsernameStatusText, "Client version too outdated to access servers", Color.red); + break; + case "-997": + AccountHandler.UpdateStatusText(changeUsernameStatusText, "Encryption/decryption issues", Color.red); + break; case "1": PlayerPrefs.SetString("userName", changeUsernameNewUsernameInput.text); AccountHandler.instance.SwitchPanel(0); diff --git a/Assets/Scripts/AccountMenu/AccountLoggedIn.cs b/Assets/Scripts/AccountMenu/AccountLoggedIn.cs index 0d6b94e..a37c2a6 100644 --- a/Assets/Scripts/AccountMenu/AccountLoggedIn.cs +++ b/Assets/Scripts/AccountMenu/AccountLoggedIn.cs @@ -62,6 +62,15 @@ public class AccountLoggedIn : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); switch (response) { + case "-999": + AccountHandler.UpdateStatusText(loggedInText, "Server error while fetching data", Color.red); + break; + case "-998": + AccountHandler.UpdateStatusText(loggedInText, "Client version too outdated to access servers", Color.red); + break; + case "-997": + AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red); + break; case "1": AccountHandler.UpdateStatusText(loggedInText, "Synced account", Color.green); break; @@ -99,6 +108,15 @@ public class AccountLoggedIn : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); switch (response) { + case "-999": + AccountHandler.UpdateStatusText(loggedInText, "Server error while fetching data", Color.red); + break; + case "-998": + AccountHandler.UpdateStatusText(loggedInText, "Client version too outdated to access servers", Color.red); + break; + case "-997": + AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red); + break; case "-1": AccountHandler.UpdateStatusText(loggedInText, "Internal login server error", Color.red); break; diff --git a/Assets/Scripts/AccountMenu/AccountLogin.cs b/Assets/Scripts/AccountMenu/AccountLogin.cs index 9a411b7..522a7a8 100644 --- a/Assets/Scripts/AccountMenu/AccountLogin.cs +++ b/Assets/Scripts/AccountMenu/AccountLogin.cs @@ -45,7 +45,22 @@ public class AccountLogin : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); if (response != "-1") { - if (response == "-2") + if (response == "-999") + { + AccountHandler.UpdateStatusText(loginPanelStatusText, "Server error while fetching data", Color.red); + return; + } + else if (response == "-998") + { + AccountHandler.UpdateStatusText(loginPanelStatusText, "Client version too outdated to access servers", Color.red); + return; + } + else if (response == "-997") + { + AccountHandler.UpdateStatusText(loginPanelStatusText, "Encryption/decryption issues", Color.red); + return; + } + else if (response == "-2") { AccountHandler.UpdateStatusText(loginPanelStatusText, "Incorrect username or password", Color.red); } diff --git a/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs b/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs index 4e193f5..e4e462c 100644 --- a/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs +++ b/Assets/Scripts/AccountMenu/AccountRefreshLogin.cs @@ -42,7 +42,22 @@ public class AccountRefreshLogin : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); if (response != "-1") { - if (response == "-2") + if (response == "-999") + { + AccountHandler.UpdateStatusText(refreshLoginStatusText, "Server error while fetching data", Color.red); + return; + } + else if (response == "-998") + { + AccountHandler.UpdateStatusText(refreshLoginStatusText, "Client version too outdated to access servers", Color.red); + return; + } + else if (response == "-997") + { + AccountHandler.UpdateStatusText(refreshLoginStatusText, "Encryption/decryption issues", Color.red); + return; + } + else if (response == "-2") { AccountHandler.UpdateStatusText(refreshLoginStatusText, "Incorrect username or password", Color.red); } diff --git a/Assets/Scripts/AccountMenu/AccountRegister.cs b/Assets/Scripts/AccountMenu/AccountRegister.cs index 02810d7..023432c 100644 --- a/Assets/Scripts/AccountMenu/AccountRegister.cs +++ b/Assets/Scripts/AccountMenu/AccountRegister.cs @@ -66,6 +66,15 @@ public class AccountRegister : MonoBehaviour string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY); switch (response) { + case "-999": + AccountHandler.UpdateStatusText(registerPanelStatusText, "Server error while fetching data", Color.red); + break; + case "-998": + AccountHandler.UpdateStatusText(registerPanelStatusText, "Client version too outdated to access servers", Color.red); + break; + case "-997": + AccountHandler.UpdateStatusText(registerPanelStatusText, "Encryption/decryption issues", Color.red); + break; case "1": AccountHandler.instance.SwitchPanel(2); break; diff --git a/Assets/Scripts/LeaderboardsMenu.cs b/Assets/Scripts/LeaderboardsMenu.cs index 14dc954..b787299 100644 --- a/Assets/Scripts/LeaderboardsMenu.cs +++ b/Assets/Scripts/LeaderboardsMenu.cs @@ -65,6 +65,11 @@ public class LeaderboardsMenu : MonoBehaviour UpdateStatus(true, "Client version too outdated to access servers"); return; } + else if (response == "-997") + { + UpdateStatus(true, "Encryption/decryption issues"); + return; + } else if (response == "-1") { UpdateStatus(true, "Server returned no results");