NullReferenceException at cmdBuyItemError

Hey,

After last update I'm getting below error message in console. The error comes up while buying someting via /s command (while clicking on price button). Did anyone had similar problem? 

(21:59:56) | Failed to call hook 'cmdBuyItem' on plugin 'ServerRewards v0.4.67' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.ServerRewards.cmdBuyItem (ConsoleSystem+Arg arg) [0x0005d] in <9675b61ebc1f422dad15e5c9e1a76328>:0 
  at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f9e] in <9675b61ebc1f422dad15e5c9e1a76328>: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

Best Regards

yes i have the same problem as well
Hey @reel25 do you still have this issue?

I was able to fix this just a second ago. What I did is:

1. Stop the server
2. Make a backup of rewards and player data
3. Delete ServerRewards.cs, json and ServerRewards folder in Data
4. Start the server
5. Add the plugin

After this it started working. What I've notied is that if i did this while the server was running it didn't work. 
Failed to call hook 'cmdBuyItem' on plugin 'ServerRewards v0.4.67' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.ServerRewards.cmdBuyItem (ConsoleSystem+Arg arg) [0x00059] in <78aca5c8bfe24dd9b1eafbcd0befe07a>:0
at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f9e] in <78aca5c8bfe24dd9b1eafbcd0befe07a>: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
10:21
Had a server do a hard crash with the power outage for 4 hours due to the half the sity losing power.
Noticed when everything came back up I get this message when trying to buy or do anything inside the Server Rewards

I dont know how to fix it, I have deleted the pulgin completely and hte config and the data files, restarted the server reinstalled added a item and I get that error below.

Some please help.

[7/31/2019 11:09:20 PM] Failed to call hook 'cmdBuyItem' on plugin 'ServerRewards v0.4.67' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.ServerRewards.cmdBuyItem (ConsoleSystem+Arg arg) [0x0005d] in <054e6c69c19848a9b6fde11e5d80c35c>:0 
  at Oxide.Plugins.ServerRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00f9e] in <054e6c69c19848a9b6fde11e5d80c35c>: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 ​


Merged post

So got it finally work. It appears you cannot just override your data files when reinstalling them, you have to edit them manually then it will work properly.