Help with DIALOG_STYLE_INPUT
#1

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 ?
Reply
#2

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)
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)