Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- var input_pass, correct_pass;
- var output_message;
- correct_pass = false;
- while( correct_pass == false)
- {
- input_pass = get_string("Please choose a password that:#Is 5 to 10 characters in length#Contains atleast one digit#Contains one letter#Contains only one instance of the @ symbol","");
- output_message = "";
- if(string_length(input_pass) < 5 )
- output_message += "Not enough characters#";
- else if (string_length(input_pass) > 10 )
- output_message += "Too many characters#" ;
- if (string_digits(input_pass) == "" )
- output_message += "You need atleast one digit in your password#";
- if (string_count("@", input_pass) < 1 || string_count("@", input_pass) > 1)
- output_message += "Your password needs to contain one @ symbol#";
- if(output_message == "")
- correct_pass = true;
- else
- show_message(output_message);
- instance_destroy()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement