aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2023-04-20 18:22:54 -0400
committerGitHub <noreply@github.com>2023-04-21 00:22:54 +0200
commitecfdf4a47beb94f90a91e0ccac25d95b5c5f3cbb (patch)
tree248a03942a5e4106a6c39f09b4543166f8ff4633 /Northstar.Client/mod/scripts
parent04b1b0be8abf1a83771e663bcee8a618a8f798ab (diff)
downloadNorthstarMods-ecfdf4a47beb94f90a91e0ccac25d95b5c5f3cbb.tar.gz
NorthstarMods-ecfdf4a47beb94f90a91e0ccac25d95b5c5f3cbb.zip
Improve server connection error messages (#598)
* Also show masterserver error for server connections It's already used for self auth and is available for both, but we currently only show it for the former. * Don't localize server connection errors It never fully worked, and it's more useful to have non-localized detailed error messages. * Don't prepend NS_SERVERBROWSER_CONNECTIONFAILED to server conn err msg The message always contains something like it, and it's always right after a connectiom anyways. * NSGetAuthFailReason always returns a string, so don't make it untyped
Diffstat (limited to 'Northstar.Client/mod/scripts')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut4
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut4
2 files changed, 5 insertions, 3 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
index b2e2a8b6..b663a25a 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -1085,9 +1085,11 @@ void function ThreadedAuthAndConnectToServer( string password = "" )
}
else
{
+ string reason = NSGetAuthFailReason()
+
DialogData dialogData
dialogData.header = "#ERROR"
- dialogData.message = "Authentication Failed"
+ dialogData.message = reason
dialogData.image = $"ui/menu/common/dialog_error"
#if PC_PROG
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
index 95b7bdae..53d85387 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
@@ -571,12 +571,12 @@ void function TryAuthWithLocalServer()
{
CloseAllDialogs()
- var reason = NSGetAuthFailReason()
+ string reason = NSGetAuthFailReason()
DialogData dialogData
dialogData.image = $"ui/menu/common/dialog_error"
dialogData.header = "#ERROR"
- dialogData.message = Localize("#NS_SERVERBROWSER_CONNECTIONFAILED") + "\nERROR: " + reason + "\n" + Localize("#" + reason)
+ dialogData.message = reason
AddDialogButton( dialogData, "#OK", null )
OpenDialog( dialogData )