error 033: array must be indexed
#1

error 033: array must be indexed (variable "dini_Get")

pawn Код:
dcmd_login(playerid, params[])
{
    new name[MAX_PLAYER_NAME], file[200];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "\\users\\%s.ini", name);
    if(Logged[playerid] == 1) return SendClientMessage(playerid, COLOUR_RED, "You are already logged in!");
    if(!dini_Exists(file)) return SendClientMessage(playerid, COLOUR_RED, "This name isn't registered! Please register now!");
    else if(strlen(params) == 0) return SendClientMessage(playerid, COLOUR_RED, "You must enter a password to login!");
    else if(params[0] != dini_Get(file, "password")) return SendClientMessage(playerid, COLOUR_RED, "Login failed!");//THIS LINE
    else
    {
        SetPlayerMoney(playerid, dini_Int(file, "cash"));
        SetPlayerScore(playerid, dini_Int(file, "score"));
        Logged[playerid] = 1;
        SendClientMessage(playerid, COLOUR_YELLOW, "You are now logged in, and your stats were automaticly loaded!");
    }
    return 1;
}
Reply


Messages In This Thread
error 033: array must be indexed - by jamesbond007 - 17.03.2011, 16:31
Re: error 033: array must be indexed - by Jochemd - 17.03.2011, 16:46
Re: error 033: array must be indexed - by jamesbond007 - 17.03.2011, 17:02
Re: error 033: array must be indexed - by Jochemd - 17.03.2011, 17:02

Forum Jump:


Users browsing this thread: 3 Guest(s)