Reputation: 107
I have this code to have the server repeatedly get input from the client until their input is viable (ViableInput returns true or false). Here is the code:
public String[] getInput() throws IOException {
String input = in.readLine();
while (ViableInput(input) == false) {
this.FireClient("Invalid Input - Required: (int, int)");
input = in.readLine(); //this line is where it gets stuck
System.out.print(input);
}
return input.split(" ");
}
it seems to get stuck on the second input line. (new input is not printed on server) Any reason why?
Upvotes: 0
Views: 32