Input Dialog: Multiple text saving error
#1

Hey guys! I'm creating another filterscript for public use and I have a problem with dialogs.

I want to add data (strings) and save them after each other, here's how:

(I know the script only saves the 0th ID, I will edit that once it works)

pawn Код:
case DIALOG_SETNAME:
        {
            if (!response) return SelectTextDraw(playerid,0x6699FF);
            if(response)
            {

                format(MDCStat[0][Name], 128, inputtext);
                ShowPlayerDialog(playerid,DIALOG_SETLINE1, DIALOG_STYLE_INPUT, "File a report on a player", "Enter what happened in 5 lines, Line 1:", "Continue", "Cancel");
            }
        }
        case DIALOG_SETLINE1:
        {
            if (!response) return 1;
            if(response)
            {
                format(MDCStat[0][History1Line1], 128, inputtext);
                ShowPlayerDialog(playerid,DIALOG_SETLINE2, DIALOG_STYLE_INPUT, "File a report on a player", "Enter what happened in 5 lines, Line 2:", "Continue", "Cancel");
            }
        }
        case DIALOG_SETLINE2:
        {
            if (!response) return 1;
            if(response)
            {
                format(MDCStat[0][History1Line2], 128, inputtext);
                ShowPlayerDialog(playerid,DIALOG_SETLINE3, DIALOG_STYLE_INPUT, "File a report on a player", "Enter what happened in 5 lines, Line 3:", "Continue", "Cancel");
            }
        }
        case DIALOG_SETLINE3:
        {
            if (!response) return 1;
            if(response)
            {
                format(MDCStat[0][History1Line3], 128, inputtext);
                ShowPlayerDialog(playerid,DIALOG_SETLINE4, DIALOG_STYLE_INPUT, "File a report on a player", "Enter what happened in 5 lines, Line 4:", "Continue", "Cancel");
            }
        }
        case DIALOG_SETLINE4:
        {
            if (!response) return 1;
            if(response)
            {
                format(MDCStat[0][History1Line4], 128, inputtext);
                ShowPlayerDialog(playerid,DIALOG_SETLINE5, DIALOG_STYLE_INPUT, "File a report on a player", "Enter what happened in 5 lines, Line 5:", "Continue", "Cancel");
            }
        }
        case DIALOG_SETLINE5:
        {
            if (!response) return 1;
            if(response)
            {
                format(MDCStat[0][History1Line5], 128, inputtext);
                SelectTextDraw(playerid,0x6699FF);
                SaveMDCP(0);
            }
        }
Basically this is a police report, I have to give the name of the suspect, and what happened in 5 lines.

This is how it saves the data:

pawn Код:
INI_WriteString (string,"Name",MDCStat[idx][Name]);

    INI_WriteString(string,"History1L1",MDCStat[idx][History1Line1]);
    INI_WriteString(string,"History1L2",MDCStat[idx][History1Line2]);
    INI_WriteString(string,"History1L3",MDCStat[idx][History1Line3]);
    INI_WriteString(string,"History1L4",MDCStat[idx][History1Line4]);
    INI_WriteString(string,"History1L5",MDCStat[idx][History1Line5]);
However when I input the data this is how it saves it:

This is the text I write in:
Name: a
Line1: b
Line2: c
Line3: d
Line4: e
Line5: f

This is how it saves the input texts:
Name = a
History1L1 = bcdef
History1L2 = cdef
History1L3 = def
History1L4 = ef
History1L5 = f

Can someone help me out with this? I want to add complete sentences not just abcdef(obviously) and it's buggy as hell.
Reply


Messages In This Thread
Input Dialog: Multiple text saving error - by DRCharlie - 27.11.2014, 15:25
Re: Input Dialog: Multiple text saving error - by DRCharlie - 27.11.2014, 17:37
Re: Input Dialog: Multiple text saving error - by MysteriousGaming - 27.11.2014, 18:18
Re: Input Dialog: Multiple text saving error - by DRCharlie - 27.11.2014, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)