Add new messages to other endpoints
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user