Legacy GM Password System Not Working

Meowanator

Member
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.
 

2Dcube

Member
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.
 
Top