Dialog Help 006 must be assigned to an array
#1

(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");
Reply
#2

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.");
                }
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)