[Error with YSI\y_ini]
#6

Here is my Dialog Response Code.

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
  new 
hashpass[129], pname[MAX_PLAYER_NAME];
  
WP_Hash(hashpass,sizeof(hashpass),inputtext);
    
  switch(
dialog)
  {
     case 
Dialog_Register:
      {
        if(!
response) return xxx(playeridRed"Relog and try to register next time :D"); kick(playerid);
        if(
response)
          {
             if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDialog_RegisterDIALOG_STYLE_INPUT""White"Registering...",""Red"You have entered an invalid password.\n"White"Type your password below to register a new account.","Register","Quit");
             new 
INI:File INI_Open(UserPath(playerid));
             
INI_SetTag(File,"Superhuman_Roleplay");
             
INI_WriteString(file,"Password",hashpass);
             
INI_WriteInt(File,"Cash",0);
             
INI_WriteInt(File,"Admin",0);
             
INI_WriteInt(File,"NormalName",GetPlayerName(playeridpnamesizeof(pname));
             
INI_WriteInt(File,"NormalLevel",0);
             
INI_WriteInt(File,"NormalSkin",26);
             
INI_WriteInt(File,"NormalAbility","None");
             
INI_WriteInt(File,"NormalWeakness","None");
             
INI_WriteInt(File,"SuperName","None");
             
INI_WriteInt(File,"SuperLevel",0);
             
INI_WriteInt(File,"SuperSkin","None");
             
INI_WriteInt(File,"Ability_1","None");
             
INI_WriteInt(File,"Ability_2","None");
             
INI_WriteInt(File,"Ability_3","None");
             
INI_WriteInt(File,"Weakness_1","None");
             
INI_WriteInt(File,"Weakness_2","None");
             
INI_WriteInt(File,"Weakness_3","None");
             
INI_Close(File);
         }
       }
     case 
Dialog_Login:
      {
         if (!
response) return "Relog and try to login next time :D"); kick(playerid);
         if(
response)
         {
           if(!
strcmp(hashpassshInfo[playerid][pPass], false))
           {
             
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
             
GivePlayerMoney(playeridshInfo[playerid][pCash]);
             
ShowPlayerDialog(playeridDialog_Success_2DIALOG_STYLE_MSGBOX,""White"Success!",""Green"You have successfully logged in!","Ok","");
           }
           else
           {
             
ShowPlayerDialog(playeridDialog_LoginDIALOG_STYLE_INPUT,""White"Login",""Red"You have entered an incorrect password.\n"White"Type your password below to login.","Login","Quit");
           }
           return 
1;
         }
      }
   }
    return 
1;

The problem is that it causes sa-mp pawn compiler to stop working.
What causes it? I checked for brackets, can somebody else give it a try.
Reply


Messages In This Thread
[Error with YSI\y_ini] - by Dreamwall - 30.06.2016, 21:34
Re: [Error with YSI\y_ini] - by Konstantinos - 30.06.2016, 21:45
Re: [Error with YSI\y_ini] - by Dreamwall - 30.06.2016, 22:06
Re: [Error with YSI\y_ini] - by Dreamwall - 30.06.2016, 22:25
Re: [Error with YSI\y_ini] - by DTV - 01.07.2016, 00:52
Re: [Error with YSI\y_ini] - by Dreamwall - 01.07.2016, 17:04
Re: [Error with YSI\y_ini] - by DTV - 01.07.2016, 17:26
Re: [Error with YSI\y_ini] - by Dreamwall - 01.07.2016, 20:03
Re: [Error with YSI\y_ini] - by Konstantinos - 01.07.2016, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)