It doesn't write on theINI File..
#1

Hi guys I created a register system but apparently it doesn't write anything on the .INI File..
Please help
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
   switch( 
dialogid )
   {
        case 
DIALOG_REGISTER:
        {
            if(!
response) return Kick(playerid);
            if(
response)
            {
                  if(!
strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""S_GREEN"Registering..",""S_RED"Invalid length.\n"S_LIGHTBLUE"Type your password below to register an account","Register","Quit");
                  new 
INI:File INI_Open(UserPath(playerid));
                  
INI_SetTag(File,"data");
                  
INI_WriteInt(File,"Pass",udb_hash(inputtext));
                  
INI_WriteInt(File,"Money",50000);
                  
INI_WriteInt(File,"AdminLevel",0);
                  
INI_WriteInt(File,"Donor",0);
                  
INI_WriteInt(File,"Deaths",0);
                  
INI_WriteInt(File,"Kills",0);
                  
INI_WriteInt(File,"Score",0);
                  
                  
ShowPlayerDialog(playerid,DIALOG_SUCCESS_1,DIALOG_STYLE_MSGBOX,""S_BLUE"Registered!",""S_GREEN"You have now registered here!Hope you enjoy the stay!","Ok","");
            }
        }
        
        case 
DIALOG_LOGIN:
        {
           if( !
response ) return Kick(playerid);
           if(
response)
           {
                if(
udb_hash(inputtext) == pInfo[playerid][Pass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playerid,pInfo[playerid][Money]);
                    
ShowPlayerDialog(playerid,DIALOG_SUCCESS_2,DIALOG_STYLE_MSGBOX,""S_GREEN"Success!",""S_BLUE"You have successfully logged in!Welcome back!","Ok.","");
                }
                else
                {
                     
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,""S_WHITE"Login",""S_RED"You have entered an invalid password!.\n"S_WHITE"Type your password below to login!","Login","Quit");
                     
                }
                return 
1;
            }
        }
   }
   return 
1;

Reply


Messages In This Thread
It doesn't write on theINI File.. - by Gotham - 09.10.2016, 12:33
Re: It doesn't write on theINI File.. - by ChristolisTV - 09.10.2016, 12:38
Re: It doesn't write on theINI File.. - by Gotham - 09.10.2016, 12:40
Re: It doesn't write on theINI File.. - by Bolex_ - 09.10.2016, 12:42
Re: It doesn't write on theINI File.. - by AndySedeyn - 09.10.2016, 13:07
Re: It doesn't write on theINI File.. - by Gotham - 09.10.2016, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)