Pudge 24 Posted September 23, 2021 Share Posted September 23, 2021 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? happiness7 1 Link to comment https://wrobot.eu/forums/topic/13528-relogger-plugin/ Share on other sites More sharing options...
Droidz 2738 Posted September 24, 2021 Share Posted September 24, 2021 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) Link to comment https://wrobot.eu/forums/topic/13528-relogger-plugin/#findComment-63657 Share on other sites More sharing options...
Pudge 24 Posted September 24, 2021 Author Share Posted September 24, 2021 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: Link to comment https://wrobot.eu/forums/topic/13528-relogger-plugin/#findComment-63658 Share on other sites More sharing options...
Pudge 24 Posted September 26, 2021 Author Share Posted September 26, 2021 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 - ������������ Link to comment https://wrobot.eu/forums/topic/13528-relogger-plugin/#findComment-63680 Share on other sites More sharing options...
Droidz 2738 Posted September 27, 2021 Share Posted September 27, 2021 chekc if you use utf8 file encodage (for the plugin file) Link to comment https://wrobot.eu/forums/topic/13528-relogger-plugin/#findComment-63690 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now