Skip to content

Commit f538556

Browse files
author
Brian MacIntosh
committed
adding error messages, fixing #5
1 parent d36b227 commit f538556

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ValheimServerWizard/Form1.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private void ServerStart()
7979

8080
if (string.IsNullOrEmpty(exePath))
8181
{
82-
MessageBox.Show("'valheim_server.exe' could not be found. It must be installed using Steam.", "EXE Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
82+
MessageBox.Show("'valheim_server.exe' could not be found. It must be installed using Steam.", "Hosting Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
8383
return;
8484
}
8585

@@ -120,25 +120,25 @@ private bool ValidateArguments()
120120
{
121121
if (worldsListBox.SelectedItem == null)
122122
{
123-
//TODO: error
123+
MessageBox.Show("No world is selected.", "Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
124124
return false;
125125
}
126126

127127
if (serverNameTextBox.Text.Length <= 0)
128128
{
129-
//TODO: error
129+
MessageBox.Show("Server name cannot be empty.", "Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
130130
return false;
131131
}
132132

133133
if (serverNameTextBox.Text == passwordBox.Text)
134134
{
135-
//TODO: error
135+
MessageBox.Show("Password cannot be the same as the server name.", "Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
136136
return false;
137137
}
138138

139139
if (passwordBox.Text.Length < 5)
140140
{
141-
//TODO: error
141+
MessageBox.Show("Password must be at least 5 characters.", "Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
142142
return false;
143143
}
144144

0 commit comments

Comments
 (0)