Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. {
  2. var input_pass, correct_pass;
  3. var output_message;
  4.  
  5. correct_pass = false;
  6.  
  7. while( correct_pass == false)
  8. {
  9. 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","");
  10.  
  11. output_message = "";
  12.  
  13. if(string_length(input_pass) < 5 )
  14. output_message += "Not enough characters#";
  15. else if (string_length(input_pass) > 10 )
  16. output_message += "Too many characters#" ;
  17. if (string_digits(input_pass) == "" )
  18. output_message += "You need atleast one digit in your password#";
  19. if (string_count("@", input_pass) < 1 || string_count("@", input_pass) > 1)
  20. output_message += "Your password needs to contain one @ symbol#";
  21.  
  22. if(output_message == "")
  23. correct_pass = true;
  24. else
  25. show_message(output_message);
  26. instance_destroy()
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement