1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

GM:S 1.4 Password System Not Working

Discussion in 'Programming' started by Meowanator, Dec 13, 2017.

  1. Meowanator

    Meowanator Member

    Joined:
    Mar 21, 2017
    Posts:
    72
    I am trying to make a password system for unlocking a character, but it isn't working.

    In the Button's Create Event:
    Code:
    password = "";
    In the Button's Left Pressed Event:
    Code:
    password = get_string_async("Enter a Password","");
    
    if password != ""{
        if password = "Zoroark"{
            if global.zoroark_unlocked = false {
                global.zoroark_unlocked = true;
                show_message_async("Unlocked Zoroark!");
            }else{
                show_message_async("Zoroark is already Unlocked.");
            }
        }else{
            show_message_async("That Password is not Supported.")
        }
    }
    When I type in the password, it always says "That Password is not Supported." even when I get the right password. I even tried not capitalizing the password and it doesn't work.
     
  2. 2Dcube

    2Dcube Member

    Joined:
    Jun 23, 2016
    Posts:
    384
    I'm not really sure how get_string_async works but you could try get_string() ?
    I think it could be that the code after get_string_async gets executed before you have entered the password.
     
  3. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,143

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice