error 033: array must be indexed (variable "inputtext")
#1

Код:
error 033: array must be indexed (variable "inputtext")
pawn Код:
if(dialogid == 2)
    {
        if(!response)
        {
            SendClientMessage(playerid, 0xFF0000, "You have to login to play on this server!");
            Kick(playerid);
        }
        else
        {
            new file[128], inpw;
            format(file, sizeof(file), "\\Users\\%s.ini", pName(playerid));
            inpw = dini_Int(file, "password");
            if(inputtext != inpw && countpw < 4) // <-------------------- Line with error.
            {
                new countpw = 0;
                new stringc[128];
                format(stringc,sizeof(stringc),"You have entered the wrong password for %s, you have %i tries left.", pName(playerid), countpw);
                SendClientMessage(playerid, 0xB20000, stringc);
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Kick");
                countpw++;
                return 1;
            }
            else if(inputtext != inpw && countpw > 3)
            {
                new stringc[128];
                format(stringc,sizeof(stringc),
                SendClientMessage(playerid, 0xFF0000, "You have been kicked for entering a wrong password for %s three times.", pName(playerid));
                Kick(playerid);
                return 1;
            }
            else
            {
                SetPlayerScore(playerid, dini_Int(file, "score"));
                GivePlayerMoney(playerid, dini_Int(file, "money")-GetPlayerMoney(playerid));
                SendClientMessage(playerid, 0xFFFF00, "You have successfully logged in!");
                return 1;
            }
        }
        return 1;
    }
    return 0;
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)