Good job![]()
|
|
What your adding:
If you do this tutorial your players wont crash if they accidently click on login without entering their usernames
In your client.java search this:
U should see one or two line sbelow it try {, under try { add:Code:method84(String s, String s1, boolean flag) {
Code:if(s == "" && s1 == "") { aString1266 = "@[email protected]'re supposed to type your username "; aString1267 = "@[email protected] password down there."; return; } if(s != "" && s1 == "") { aString1266 = "@[email protected]'re supposed to type"; aString1267 = "@redyour password down there."; return; } if(s == "" && s1 != "") { aString1266 = "@[email protected]'re supposed to type"; aString1267 = "@[email protected] username down there."; return; } if(s1 == "") { aString1266 = "@[email protected]'re supposed to type"; aString1267 = "@[email protected] password down there."; return; } if(s == "") { aString1266 = "@[email protected]'re supposed to type"; aString1267 = "@[email protected] username down there."; return; }
Good job![]()
yes i didnt work out the text very well, thats why i said you could change it urself![]()
And no problem mate![]()
Donethanks dust

Better:
Code:if(myUsername.length() < 4 && myPassword.length() < 4) { loginMessage1 = "Your username & password must be"; loginMessage2 = "4 to 12 characters long to login!"; return; } if(myUsername.length() > 4 && myPassword.length() < 4) { loginMessage1 = "Your password must be"; loginMessage2 = "4 to 12 characters long"; return; } if(myUsername.length() < 4 && myPassword.length() > 4) { loginMessage1 = "Your username must be"; loginMessage2 = "4 to 12 characters or long to login!"; return; } if(myPassword.length() < 4) { loginMessage1 = "Your password must be"; loginMessage2 = "4 to 12 characters long"; return; } if(myUsername.length() < 4) { loginMessage1 = "Your username must be"; loginMessage2 = "4 to 12 characters long"; return; }
Ok phantasm, nothing else to say?

What else is there to say? It's not hard and you could of at least added length requirements to it as I did.
i didnt knew about length();, now i do thanks for that.
| « Username & password length requirements. | Renaming Multiple Files » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |