1. It seems like I keep getting this error when running for loops all of a sudden.
    [​IMG]

    the function that runs this loop goes like this:
    Code:
    setTitles: function(steamID, player) {
        var getAuth = player.net.connection.authLevel;
        var j = this.Config.Titles.length,
          i = 0;
        var showPlayer = this.Config.Settings.showPlayer;    for (i; i < j; i++) {
            print("Running For Loop: " + this.Config.Titles[i])
          if (showPlayer && !GroupsAPI && !this.Config.Settings.hideAllAdmins) {
            print("Grabbed Logic")
            if (getAuth == this.Config.Titles[i].authLvl && TitlesData.PlayerData[steamID].Title === this.Config.Titles[i].title) {
              TitlesData.PlayerData[steamID].Title = this.Config.Titles[i].title;
              player.displayName = TitlesData.PlayerData[steamID].RealName + "[" + TitlesData.PlayerData[steamID].Title + "]";
            }
          } else if (showPlayer && GroupsAPI && !this.Config.Settings.hideAllAdmins && TitlesData.PlayerData[steamID].Title === this.Config.Titles[i].title) {
            if (this.Config.Titles[i].authLvl === getAuth && !this.Config.Titles[i].Exclude) {
              TitlesData.PlayerData[steamID].Title = this.Config.Titles[i].title;
              GroupData.PlayerData[steamID].RealName = TitlesData.PlayerData[steamID].RealName + "[" + TitlesData.PlayerData[steamID].Title + "]";
            }
          } else if (!showPlayer && getAuth === 0 && TitlesData.PlayerData[steamID].Title === this.Config.Titles[i].title) {
            if (this.Config.Titles[i].authLvl === getAuth && !this.Config.Titles[i].Exclude) {
              player.displayName = TitlesData.PlayerData[steamID].RealName;
            }
          } else if (this.Config.Settings.hideAllAdmins && getAuth === 2 && TitlesData.PlayerData[steamID].Title === this.Config.Titles[i].title) {
            if (this.Config.Titles[i].authLvl === getAuth && !this.Config.Titles[i].Exclude) {
              player.displayName = TitlesData.PlayerData[steamID].RealName;
            }
          }
        }
        this.saveData();
      },
    this is called on playerinit, and with a data reset. it was working before but all of a sudden I can't get rid of this error. It was doing the same thing with another Function but when I re wrote it (to pretty much be the exact same thing) the error seemed to go away.
    Any suggestions?
     
  2. KeyNotFoundException must be an issue with getting an entry from config/datafile if an object which is stored is not existent...like steamid missing or unknown object property...
    beside that it shouldn't be an .Net object there, instead giving you an undefined result, i've created a fix for it (hopefully) which should be available in oxide build > 406
    this shouldn't solve your problem that the function is not working as expected, but you can debug it without that exception...
     
  3. Alright, perfect. Thank you kindly for the feedback sir.