It seems like I keep getting this error when running for loops all of a sudden.
the function that runs this loop goes like this:
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.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(); },
Any suggestions?
TargetInvocationException while calling resetData
Discussion in 'Rust Development' started by KillParadise, Mar 4, 2015.