September 23, 20214 yr Hi, I am trying to make a plugin for a relogger that will change account data depending on the conditions. I am facing a problem. System.Threading.Tasks.Task.Factory.StartNew(() => { for (int i = 0; i < Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles.Count; i++) { try { var p = Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles[i]; if (p.Checked && p.Name.ToLower().Contains("myaccountname")) { robotManager.Helpful.Logging.Write("124"); p.CurrentWowAccount.AccountName = "1242"; p.CurrentWowAccount.Password = "1242"; } } catch (Exception e) { robotManager.Helpful.Logging.WriteError(Name + " > " + e); } } }); When trying to read or change the field CurrentWowAccount.AccountName or CurrentWowAccount.Password I get the error: [E] 22:26:06 - CHANGEKEY > System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта. в MyNamespace.MyPlugin.b__0() Is it possible to implement changing account data through a plugin or is this error a consequence of data protection?
September 24, 20214 yr Hey, In you log you have line robotManager.Helpful.Logging.Write("124")? try to add these lines afer: robotManager.Helpful.Logging.Write("p.CurrentWowAccount==null > " + (p.CurrentWowAccount == null)); robotManager.Helpful.Logging.Write("p.CurrentWowAccount.AccountName==null > " + (p.CurrentWowAccount.AccountName == null)); robotManager.Helpful.Logging.Write("p.CurrentWowAccount.Password==null > " + (p.CurrentWowAccount.Password == null)); You run this code at start? if yes try to wait few seconds (maybe relogger profiles are not completly loaded)
September 24, 20214 yr Author 1 hour ago, Droidz said: You run this code at start? This is the body of the OnButtonPress() method Аfter adding robotManager.Helpful.Logging.Write("p.CurrentWowAccount==null > " + (p.CurrentWowAccount == null)); robotManager.Helpful.Logging.Write("p.CurrentWowAccount.AccountName==null > " + (p.CurrentWowAccount.AccountName == null)); robotManager.Helpful.Logging.Write("p.CurrentWowAccount.Password==null > " + (p.CurrentWowAccount.Password == null)); We get:
September 26, 20214 yr Author I think I figured out why it didn't work. p.CurrentWowAccount == null if no windows are running in the relogger. There is one more problem, the relogger for some reason does not support the russian language, instead of it there are some symbols in the form of a question mark. do so: robotManager.Helpful.Logging.Write("авбгдиичоаып"); we get: 22:03:04 - ������������
Create an account or sign in to comment