SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/05/2012, 08:13 PM   #11
mprofitt
Huge Clucker
 
Join Date: Jul 2008
Posts: 459
Reputation: 11
Default Re: strcmp question

Quote:
Originally Posted by 2KY View Post
You both did, thank you. I'll +rep you momentarily. I have another question... I just got the following printed in my server console, I've never seen it before..



The code:

pawn Code:
case    DIALOG_LOGIN: {
                    if( response )
                    {
                        if( !strlen( inputtext ) ) //They hit enter without entering a password.
                            return ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Welcome to SA:MP - Zone DM!", "\n\nYou have entered an invalid password, in order to assist you, a plain text password field has been enabled.\n\nPlease enter your password below to be logged in.", "Submit", "Quit" );
                           
                        if( strcmp( accInfo[ playerid ] [ Password ], inputtext, false ) )
                            return ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Welcome to SA:MP - Zone DM!", "\n\nYou have entered an invalid password, in order to assist you, a plain text password field has been enabled.\n\nPlease enter your password below to be logged in.", "Submit", "Quit" );

                        INI_ParseFile( GetAccountPath( playerid ), "LoadUser_%s", .bExtra = true, .extra = playerid );
                       
                        player_Logged [ playerid ] = true;
                       
                        SpawnPlayer( playerid );
                       
                        GivePlayerMoney( playerid, 9999999 );
                    }
                    else if( !response )
                    {
                        SendClientMessage( playerid, 0xFFFFFFFF, "You have chosen to quit the server. We hope you visit again soon!" );
                        Kick( playerid );
                    }
                }

? O.o
I have received the error "dialog ID doesn't match last sent dialog ID" error as well. It seems to happen when the server restarts while a dialog is open. The client reconnects and has the same dialog plus the client is hung until you close the dialog. Then the script continues as normal. This look like some ind of bug. When the server restarts, the client should forget about all dialogs that were open at the time.
mprofitt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
strcmp help Frank Biohazard Scripting Help 3 02/03/2012 12:00 PM
help with strcmp [MKD]Max Help Archive 2 12/07/2011 07:11 PM
Strcmp to SQL [UG]Scripter Help Archive 4 14/09/2010 07:03 AM
[Help]Noob question (strcmp) zilvernex Help Archive 5 20/12/2009 03:53 AM
[Question] Strcmp Matthew_Murdoch Help Archive 2 05/11/2009 11:47 PM


All times are GMT. The time now is 01:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.