SA-MP Forums Archive
Problem with DIALOG_STYLE_INPUT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with DIALOG_STYLE_INPUT (/showthread.php?tid=259969)



Problem with DIALOG_STYLE_INPUT - MrND - 06.06.2011

I have a problem with my DIALOG, it doesn't set player age from INPUT text, he/she needs to re-type his date of birthday in F6(T). Also I have one error while compiling my gamemode:

ERROR:
Код:
C:\Documents and Settings\ADMIN\Desktop\samp03csvr_R2-2_win32\gamemodes\larp.pwn(10463) : error 017: undefined symbol "text"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
split(text, DateInfo, '/');
CODES THAT I'M USING:

pawn Код:
ShowPlayerDialog(playerid,275,DIALOG_STYLE_INPUT,"Koliko godina imas?","Kada si se rodio?:","Nastavi","");
pawn Код:
if(dialogid == 275)
    {
        if(inputtext[playerid]) {
            new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            split(text, DateInfo, '/'); // ---> THIS IS LINE THAT HAS ERROR(10463)
            if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year) {
                SendClientMessage(playerid, COLOR_GREEN, "Koliko godina imas? (Use dd/mm/gggg)");
                return 0;
            }
            new check = year - strvalEx(DateInfo[2]);
            if(check == year) {
                SendClientMessage(playerid, COLOR_GREEN, "Koliko godina imas?? (Use dd/mm/gggg)");
                return 0;
            }
            if(strvalEx(DateInfo[1]) > month) {
                check -= 1;
            }
            else if(strvalEx(DateInfo[1]) == month && strval(DateInfo[0]) > day) {
                check -= 1;
            }
            PlayerInfo[playerid][pAge] = check;
            format(string, sizeof(string), "Uredu, dakle ti si %d godina star.",PlayerInfo[playerid][pAge]);
            SendClientMessage(playerid, COLOR_YELLOW2, string);
            RegistrationStep[playerid] = 3;
            SendClientMessage(playerid, COLOR_GREEN, "Odakle si? (Type in: LS, SF, LV or LC)");
            ShowPlayerDialog(playerid,274,DIALOG_STYLE_LIST,"Odakle si?","1. LS\r\n2. SF\r\n3. LV\r\n4. LC","Next", "");
        }
        return 1;
    }
Thank you in advance!


AW: Problem with DIALOG_STYLE_INPUT - Drebin - 06.06.2011

what do you mean with "text" ?
Should this be the text the player types into the dialog ? If yes change it to "inputtext"
If not, you have to define "text" (new text