09.03.2019, 15:26
Hello,
I've a problem with dialog response, it has stopped working all of sudden.
We're talking about easyDialog include.
Tried changing return 1 to 0, same result
Debug message which I've added doesn't print at all
The dialog pops up, but RESPONSE isn't working
All plugins correctly loaded
What could be the problem?
I've a problem with dialog response, it has stopped working all of sudden.
We're talking about easyDialog include.
PHP Code:
if(cache_num_rows())
{
format(string, sizeof(string), "{FFFFFF}Welcome back, {FF0000}%s{FFFFFF}!\n{FFFFFF}Please enter your password to continue.", GetName(playerid));
Dialog_Show(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "{ADD8E6}Login", string, "Login", "Cancel");
}
PHP Code:
Dialog:LOGIN(playerid, response, listitem, inputtext[])
{
printf("DEBUG: (DIALOG_LOGIN): PLAYERID: %d, RESPONSE: %d, LISTITEM: %d", playerid, response, listitem);
if(response)
{
new query[500], Password[BCRYPT_HASH_LENGTH];
mysql_format(Database, query, sizeof(query), "SELECT `Password` FROM `userdata` WHERE `User`='%e' LIMIT 1;", GetName(playerid));
new Cache:result = mysql_query(Database, query);
cache_get_value_name(0, "Password", Password, BCRYPT_HASH_LENGTH);
bcrypt_check(inputtext, Password, "OnPasswordChecked", "d", playerid);
cache_delete(result);
}
else
Kick(playerid);
return 1;
}
Debug message which I've added doesn't print at all
The dialog pops up, but RESPONSE isn't working
All plugins correctly loaded
What could be the problem?