SA-MP Forums Archive
Dialog Help 006 must be assigned to an array - 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)
+--- Thread: Dialog Help 006 must be assigned to an array (/showthread.php?tid=403875)



Dialog Help 006 must be assigned to an array - AMEENAMEEN - 01.01.2013

(47597) : error 006: must be assigned to an array
(4759 : error 017: undefined symbol "string"
(4759 : error 017: undefined symbol "string"
(4759 : error 029: invalid expression, assumed zero
(4759 : fatal error 107: too many error messages on one line
pawn Код:
if(dialogid == DIALOG_REGISTER2)
    {
        if (response == 1)
        {
            switch(listitem)
            {
                case 0:
                if(strlen(inputtext) >= 10 && strlen(inputtext) <= 90)
                 {
                    PlayerInfo[playerid][pAge] = inputtext;
                    format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    SetPVarInt(playerid, "RegistrationStep", 3);
                    SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Origin? (Type in: USA, Europe, Asia or Africa)");
                    }
                 else
                 {
                     SendClientMessage(playerid,0xFFFFFFAA,"Your Age must be 10-90.");
                }
            }
        }
    }
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_INPUT, "Your Age", "Type your Age here.", "Submit", "Cancel");



Re: Dialog Help 006 must be assigned to an array - Threshold - 01.01.2013

Try this:

pawn Код:
if(dialogid == DIALOG_REGISTER2)
    {
        if (response == 1)
        {
            switch(listitem)
            {
                case 0:
                if(strval(inputtext) >= 10 && strval(inputtext) <= 90)
                 {
                    new string[30];
                    PlayerInfo[playerid][pAge] = strval(inputtext);
                    format(string, sizeof(string), "Ok, so you are %d years old.",PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_YELLOW2, string);
                    SetPVarInt(playerid, "RegistrationStep", 3);
                    SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Origin? (Type in: USA, Europe, Asia or Africa)");
                    }
                 else
                 {
                     SendClientMessage(playerid,0xFFFFFFAA,"Your Age must be 10-90.");
                }
            }
        }
    }