invalid subscript?
#1

what could be wrong with this simple code..

pawn Код:
public OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
            MySQLCheckConnection();
            new playername3[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername3, sizeof(playername3));
            new newaccountsqlid = MySQLCreateAccount(playername3, password);
            if (newaccountsqlid != 0)
            {
                pInfo[playerid][pSQLID] = newaccountsqlid;
                strmid(pInfo[playerid][pKey], password, 0, strlen(password), 255);
                OnPlayerUpdate(playerid);
                SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "Account registered, you can now log in (/login [password]).");
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "There was an error creating your account. You will be disconnected now.");
                Kick(playerid);
                return 0;
            }
    }
    return true;
}

im getting this error and i dont know why
error 028: invalid subscript (not an array or too many subscripts): "pInfo"
Reply


Messages In This Thread
invalid subscript? - by Hornet600 - 17.10.2010, 20:10

Forum Jump:


Users browsing this thread: 1 Guest(s)