NullReferenceException in cmdTrade when using Ignore pluginFixed
Hi,

When loading Ignore last night, trade stopped working. I can post this to the Ignore plugin but as this plugin is throwing errors, figured i'd post here first.

(16:45:13) | Failed to call hook 'cmdTrade' on plugin 'Trade v1.2.4' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.Trade.cmdTrade (BasePlayer player, System.String command, System.String[] args) [0x0018c] in <375cef69847e43ed9d4c819cd0b39a5d>:0 
  at Oxide.Plugins.Trade.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00b08] in <375cef69847e43ed9d4c819cd0b39a5d>: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
The error is likely coming from this plugin's use of the Ignore plugin in the command. This plugin uses an method named IsIgnoredS, which doesn't exist anymore.
Thanks Wulf! removed the if statement and another reference and it's fine now.
I've requested the developer to Update Trade, they will most likly fix it soon.

Failed to call hook 'cmdTrade' on plugin 'Trade v1.2.41' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.Trade.cmdTrade (BasePlayer player, System.String command, System.String[] args) [0x0018c] in <94e49b8fa1dd43f59be55fedaf9ce780>:0

at Oxide.Plugins.Trade.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00b08] in <94e49b8fa1dd43f59be55fedaf9ce780>: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

Are you using the Ignore plugin?

Yes, im using it

Ver 1.2.41

3 days ago

Fix Ignore plugin integration

Getting this hook error when players run trade command, is this due to oxide hooks being broken still?

Failed to call hook 'cmdTrade' on plugin 'Trade v1.2.41' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.Trade.cmdTrade (BasePlayer player, System.String command, System.String[] args) [0x0018c] in <5b46f85a9a774c4095a001dd87b11a7a>:0
at Oxide.Plugins.Trade.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00b08] in <5b46f85a9a774c4095a001dd87b11a7a>: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
In response to robo3232 ():
Getting this hook error when players run trade command, is this due to oxide hooks being broken stil...
No, please see the above replies.
yep works like charm now soon as I removed ignore plugin
You just needed to use an updated version of Trade & Ignore for it to work.
Exception

Let me know if you need any other additional information.

Great plugin overall, thanks!
Failed to call hook 'cmdTrade' on plugin 'Trade v1.2.41' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.Trade.cmdTrade (BasePlayer player, System.String command, System.String[] args) [0x0018c] in <88a19544484346f1884212808b15e2bd>:0
at Oxide.Plugins.Trade.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00b08] in <88a19544484346f1884212808b15e2bd>: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
Do i have to do a server restart for this to work? I have set permissions and /trade command work but no chat notification when we try to /trade playername ????
Did you check your oxide/logs for errors? Did you make sure you're using the latest version?
Locked automatically