SA-MP Forums Archive
DIALOG RESPONSE ERROR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DIALOG RESPONSE ERROR (/showthread.php?tid=664732)



DIALOG RESPONSE ERROR - Kolibrii - 09.03.2019

Hello,

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(stringsizeof(string), "{FFFFFF}Welcome back, {FF0000}%s{FFFFFF}!\n{FFFFFF}Please enter your password to continue."GetName(playerid));
            
Dialog_Show(playeridLOGINDIALOG_STYLE_PASSWORD"{ADD8E6}Login"string"Login""Cancel");
        } 
PHP Code:
Dialog:LOGIN(playeridresponselistiteminputtext[])
{
    
printf("DEBUG: (DIALOG_LOGIN): PLAYERID: %d, RESPONSE: %d, LISTITEM: %d"playeridresponselistitem);
    if(
response)
    {
        new 
query[500], Password[BCRYPT_HASH_LENGTH];
        
mysql_format(Databasequerysizeof(query), "SELECT `Password` FROM `userdata` WHERE `User`='%e' LIMIT 1;"GetName(playerid));
        new 
Cache:result mysql_query(Databasequery);
        
cache_get_value_name(0"Password"PasswordBCRYPT_HASH_LENGTH);
        
bcrypt_check(inputtextPassword"OnPasswordChecked""d"playerid);
        
cache_delete(result);
    }
    else
        
Kick(playerid);
    return 
1;

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?


Re: DIALOG RESPONSE ERROR - v1k1nG - 09.03.2019

If you defined the dialog somewhere, delete the definition, also check if the dialog has the exact name always


Re: DIALOG RESPONSE ERROR - Kolibrii - 09.03.2019

Quote:
Originally Posted by v1k1nG
View Post
If you defined the dialog somewhere, delete the definition, also check if the dialog has the exact name always
I haven't. I've copy-pasted the name, so it's surely exact.

Register dialog also doesn't work (I have just these two), and it's even simpler than this one. No response however.

It was working before and I'm sure that I haven't done any changes to that part of code.

Since I noticed the error, the last changes I made was adding PreviewModelDialog.inc from this link:
https://sampforum.blast.hk/showthread.php?tid=570213

I have removed PreviewModelDialog completely, but that didn't fix the problem


Re: DIALOG RESPONSE ERROR - Kolibrii - 10.03.2019

Bump


Re: DIALOG RESPONSE ERROR - Kolibrii - 11.03.2019

bump