Jump to content

error

Fixed 1.1.5 1.1.6

GooberGrape
GooberGrape

Posted

when I click on a players name 

 

`Failed to call hook 'WTrading_TradeSent' on plugin 'WTrading v1.1.5' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
  at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000f9] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0 
  at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0 
  at System.String.Format (System.String format, System.Object[] args) [0x00020] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0 
  at Oxide.Plugins.WTrading.Localise (BasePlayer player, System.String key, System.Object[] arguments) [0x00013] in <ba5446e96da541d0887edcb3f615e10b>:0 
  at Oxide.Plugins.WTrading.WTrading_TradeSent (BasePlayer caller, BasePlayer target) [0x0004b] in <ba5446e96da541d0887edcb3f615e10b>:0 
  at Oxide.Plugins.WTrading.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0068c] in <ba5446e96da541d0887edcb3f615e10b>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0 
Continuum Banshee was killed by Scientist[68324] at (166.19, 73.96, -15.71)`

GooberGrape

Posted

I asked Grok to fix and he came up with 

Potential Related Issues

While fixing this, I noticed the Trade.Send() method also uses "commands.trade.request_received":

csharp

CollapseWrapCopy

WTrading.Instance.LocalisedReply(Target, "commands.trade.request_received", Creator.Name);

This call does provide an argument (Creator.Name), so it shouldn’t cause the same error. The issue is specific to WTrading_TradeSent due to the missing argument in its Localise call.

Final Thoughts

The error stemmed from a simple oversight in argument passing, which is now corrected. This fix should resolve the FormatException for the WTrading_TradeSent hook on Oxide.Rust 2.0.6408 as of March 9, 2025. If you encounter additional errors or unexpected behavior after applying this, please share the new logs or symptoms, and I’ll assist further! Let me know how it goes.

Tom.bat

Posted

Changed Status from Pending to Fixed

Changed Fixed In to Next Version

1.6m

Downloads

Total number of downloads.

7.6k

Customers

Total customers served.

114.9k

Files Sold

Total number of files sold.

2.3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.