NullReferenceException at OnServerInitializedFixed

Hi,

The current version of this plugin seems to be no longer working. It just gives this error on load.

Failed to call hook 'OnServerInitialized' on plugin 'PowerlessTurrets v2.1.7' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PowerlessTurrets.OnServerInitialized () [0x00000] in <53b01988abb64081a40d0939a0c226c9>:0
  at Oxide.Plugins.PowerlessTurrets.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000b0] in <53b01988abb64081a40d0939a0c226c9>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
I'll take a look on Thursday, the last of my exams for a couple of weeks finish up on Wednesday.
Thanks for the response. Good luck on your exams.
Just a heads up, having server issues. Will have to reinstall.

Merged post

Edit: I accidentally put the linux build on my windows pc ... lol.

Merged post

I tried but have not been able to recreate this error. Should it happen again, please provide more detail on when and how.

Thanks!
August

I just got it working after deleteing each file generated by the plugin and downloading a fresh copy and reinstalling.

I had deleted and re-added the plugin to the server several times and with our latest wipe today I reinstalled a fresh copy of the Rust dedicated server, installed fresh oxide, and copied over only our essential data files and we were still getting these errors for some reason. 

Even though I was doing a reinstall of the plugin and deleting the config file, it would re-create the config file on plugin load with just "null" in the file. I had never bothered to check the config file before so I did not know it had actual configuration values in it.

It seems I needed to delete the file inside of oxide/lang/en as well as the plugin and the config file to get it to re-write the config file properly.

Thanks for taking a look and letting me know the plugin was working for you.

 

Not sure if you want to investigate what would cause it to write null in the config file, but just incase here are the errors.

We were getting this error on load:

Failed to call hook 'TurretCommand' on plugin 'PowerlessTurrets v2.1.7' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PowerlessTurrets.TurretCommand (BasePlayer player, System.String cmd, System.String[] args) [0x00044] in <4e0b187b710c4c119fcdfdf1ab572a0d>:0
at Oxide.Plugins.PowerlessTurrets.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00144] in <4e0b187b710c4c119fcdfdf1ab572a0d>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

And this error when we were trying to activate a turret using /turret:

Failed to call hook 'TurretCommand' on plugin 'PowerlessTurrets v2.1.7' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PowerlessTurrets.TurretCommand (BasePlayer player, System.String cmd, System.String[] args) [0x00044] in <4e0b187b710c4c119fcdfdf1ab572a0d>:0
at Oxide.Plugins.PowerlessTurrets.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00144] in <4e0b187b710c4c119fcdfdf1ab572a0d>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
sure, thanks!
Failed to call hook 'OnServerInitialized' on plugin 'PowerlessTurrets v3.0.4' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PowerlessTurrets.OnServerInitialized () [0x00029] in <9e2959685add47188386983f9dd0f862>:0
  at Oxide.Plugins.PowerlessTurrets.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0023c] in <9e2959685add47188386983f9dd0f862>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0

Is it just me getting this after the Rust Update?

Please try the latest version and let us know if the issue continues, thanks!

Locked automatically