Y_Ini isn't saving...
#1

Here is my code:

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                print("1");
                INI_WriteInt(File,"Lozinka",udb_hash(inputtext));
                print("2");
                INI_WriteInt(File,"Novac",5000);
                print("3");
                INI_WriteInt(File,"Admin",0);
                print("4");
                INI_WriteInt(File,"Tut",0);
                print("5");
                INI_WriteInt(File,"Warn",0);
                print("6");
                INI_WriteInt(File,"Exp",0);
                print("7");
                INI_WriteInt(File,"Level",1);
                print("8");
                INI_WriteInt(File,"Sati",1);
                print("9");
                INI_WriteInt(File,"CHB",0);
                print("10");
                INI_WriteInt(File,"BandaUgovor",0);
                print("11");
                INI_WriteInt(File,"Banda",0);
                print("12");
                INI_WriteInt(File,"PayDayP",0);
                print("13");
                INI_WriteInt(File,"Ubojstva",0);
                print("14");
                INI_WriteInt(File,"Smrti",0);
                print("15");
                INI_Close(File);
                print("16");
and here is what i find in scriptfiles

pawn Код:
[data]
Lozinka = 70058402
Novac = 0
Admin = 0
Tut = 0
Warn = 0
Exp = 0
Level = 0
Sati = 0
CHB = 0
BandaUgovor = 0
Banda = 0
PayDayP = 0
Ubojstva = 0
Smrti = 0
Why Y_Ini didn't want to write is something wrong?
Reply
#2

post ur register and login codes please
Reply
#3

pawn Код:
case DIALOG_REGISTER:
        {
            if (!response) return KickP(playerid, "Izasli ste!");
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Upisali ste prekratku lozinku.\n"COL_WHITE"Upisite svoju lozinku da se registrirate.","Registracija","Izlaz");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                print("1");
                INI_WriteInt(File,"Lozinka",udb_hash(inputtext));
                print("2");
                INI_WriteInt(File,"Novac",5000);
                print("3");
                INI_WriteInt(File,"Admin",0);
                print("4");
                INI_WriteInt(File,"Tut",0);
                print("5");
                INI_WriteInt(File,"Warn",0);
                print("6");
                INI_WriteInt(File,"Exp",0);
                print("7");
                INI_WriteInt(File,"Level",1);
                print("8");
                INI_WriteInt(File,"Sati",1);
                print("9");
                INI_WriteInt(File,"CHB",0);
                print("10");
                INI_WriteInt(File,"BandaUgovor",0);
                print("11");
                INI_WriteInt(File,"Banda",0);
                print("12");
                INI_WriteInt(File,"PayDayP",0);
                print("13");
                INI_WriteInt(File,"Ubojstva",0);
                print("14");
                INI_WriteInt(File,"Smrti",0);
                print("15");
                INI_Close(File);
                print("16");

                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Registriran!",""COL_GREEN"Super! Tvoj racun je napravljen.\nOtidi relog da ti se spremi racun i podatci.","Ok","");
            }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return KickP(playerid, "Izasli ste!");
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pLozinka])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Logiran!",""COL_GREEN"Uspijesno ste se prijavili!","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Prijava",""COL_RED"Upisali ste pogresnu lozinku.\n"COL_WHITE"Upisi svoju lozinku da se prijavis.","Prijava","Izlaz");
                }
                return 1;
            }
        }
it dosen't want write.. but it create a file... when i manual open account and write it loads normal..

Only when i'm register it dosen't want write... it write password but level, money and other not..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)