Y_INI Saving System Bugged - if not, please help me here
#1

Isn't this allowed in yini save data system or what ?

i was saving player's data in 1 folder, but since the data is so much to read, i made 3 folders (paths) in scriptfiles folder
1. UsersGeneralData
2. MedicStats
3. CopStats

these are the 3 folders, each one of them is saving some data instead of saving all data in UsersGeneralData.

What's wrong in this script ?

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(strlen(inputtext))
                {
                    new INI:File = INI_Open(UserPath(playerid));
                    new INI:MedicFile = INI_Open(MedicPath(playerid));
                    new INI:CopFile = INI_Open(CopPath(playerid));

                    INI_SetTag(File,"data");
                    INI_WriteInt(File,"Password",udb_hash(inputtext));
                    INI_WriteInt(File,"Cash",25000);
                    INI_WriteInt(File,"Score",10);
                    INI_WriteInt(File,"Deaths",0);
                    INI_WriteInt(File,"Jailed",0);
                    INI_WriteInt(File,"JailTime",0);
                    INI_Close(File);
//                  ============================================
                    INI_SetTag(MedicFile,"data");
                    INI_WriteInt(MedicFile,"MedicRank",0);
                    INI_WriteInt(MedicFile,"PlayersHealed",0);
                    INI_WriteInt(MedicFile,"PlayersCured",0);
                    INI_WriteInt(MedicFile,"HealedCash",0);
                    INI_WriteInt(MedicFile,"CuredCash",0);
                    INI_WriteInt(MedicFile,"TimesBeenHealed",0);
                    INI_WriteInt(MedicFile,"TimesBeenCured",0);
                    INI_Close(MedicFile);
//                  ============================================
                    INI_SetTag(CopFile,"data");
                    INI_WriteInt(CopFile,"CopRank",0);
                    INI_WriteInt(CopFile,"Arrests",0);
                    INI_WriteInt(CopFile,"TicketIssued",0);
                    INI_WriteInt(CopFile,"TicketCollected",0);
                    INI_WriteInt(CopFile,"PlayerSearched",0);
                    INI_WriteInt(CopFile,"TimesArrested",0);
                    INI_WriteInt(CopFile,"TimesTakendowned",0);
                    INI_WriteInt(CopFile,"TicketReceived",0);
                    INI_WriteInt(CopFile,"TicketPaid",0);
                    INI_Close(CopFile);
//                  ============================================

                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    INI_ParseFile(MedicPath(playerid), "LoadMedic_%s", .bExtra = true, .extra = playerid);
                    INI_ParseFile(CopPath(playerid), "LoadCop_%s", .bExtra = true, .extra = playerid);
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Cops And Robbers","Account Has Been Registered Successflly\n\nType Your Password Below To Login.","Login","Quit");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Cops And Robbers","{FF0000}You Must Enter A Password To Register\n\n{FFFFFF}Type A Password Below To Register.","Register","Quit");
                }
            }
        }
    return 1;
}
Reply
#2

anyone ?
Reply
#3

can you please tell me is this is a right way to use YNI System ?
Reply
#4

it's impossible that nobody here know how to make more than 1 folder to save data -_-
Reply
#5

debug
Reply
#6

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
debug
what this suppose to mean ?
Reply
#7

BUUUUUUUUUMBBBBBBBB
Reply
#8

Guys all replies are from me, WTF, SOMEBODY HELP
Reply
#9

.........
Reply
#10

Seem to be missing a bracker } above the r in return 1;
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)