get_login_async(username,password)
Jump to navigation
Jump to search
Description
Creates a new asynchronous message box thread that will ask the user to input a username and password and fire the Asynchronous dialog event when resolved.
The following is a table of values that will be stored in the global async_load map when the thread completes and the Asynchronous dialog event is fired.
Key | Value |
---|---|
"id" | index of the thread |
"username" | the username that was entered |
"password" | the password that was entered |
Parameters
Parameter | Data Type | Description |
---|---|---|
username | string | the default username to be in the input box |
password | string | the default password to be in the input box |
Return Values
integer: Returns the index of the thread or -1 on failure to start the thread (if the thread fails it will be deleted and freed from memory automatically).
Example Call
// demonstrates asking the user to input a username and password
var thread;
thread = get_login_async("John Doe", "password");