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


Forum Jump:


Users browsing this thread: 1 Guest(s)