SA-MP Forums Archive
Help with DIALOG_STYLE_INPUT - 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: Help with DIALOG_STYLE_INPUT (/showthread.php?tid=372913)



Help with DIALOG_STYLE_INPUT - CaTaLinU - 28.08.2012

Down its the code that i have problems...

PHP Code:
    if(dialogid == RegisterEmail)
    {
            if(
response)
            {
                new 
email 50 ];
                
format email50"%s"inputtext );
                if ( 
strlen email ) > )
                {
                    
format(string,256,"Your email is : %d",email);
                    
SCM(playerid,COLOR_YELLOW,string);
                    
format PlayerInfo playerid ] [ pMail ], 50"%s"email );
                    
TutTime[playerid] = 1;
                    
RegistrationStep[playerid] = 0;
                    
PlayerInfo[playerid][pOrigin] = 1;
                    return 
1;
                }
                else return 
ShowPlayerDialog(playerid,RegisterEmail,DIALOG_STYLE_INPUT,""color_yellow"What is your email","Ex: name@yahoo.com","Done","");
            }
    } 
after this dialog style input
if i write something in that textbox
in the specific user.ini i will find Mail=99

how to fix this ?


Re: Help with DIALOG_STYLE_INPUT - avivelkayam - 28.08.2012

replace it


format(string,256,"Your email is : %d",email);
SCM(playerid,COLOR_YELLOW,string);


of this


format(string,256,"Your email is : %s",email);
SCM(playerid,COLOR_YELLOW,string);


the format %s is string (mail) and not number %d (integer)


Re: Help with DIALOG_STYLE_INPUT - FalconX - 28.08.2012

make sure it's %s (string) not %d (integer/whole number)