Jump to content

Failed to call hook TcTab error upon update of Rust Server

Closed 3.4.7 3.4.8

MK_
MK_

Posted

Failed to call hook 'TcTab' on plugin 'RaidProtection v3.4.7' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.RaidProtection.GetBalanceResourceAmount (Oxide.Plugins.RaidProtection+ProtectedEntity tc, BasePlayer basePlayer) [0x00050] in <373266e1758d4944a791f75a47f935ce>:0 
  at Oxide.Plugins.RaidProtection.ShowProtectionStatusOverlay (BasePlayer basePlayer, Oxide.Plugins.RaidProtection+ProtectedEntity tc) [0x0088a] in <373266e1758d4944a791f75a47f935ce>:0 
  at Oxide.Plugins.RaidProtection.TcTab (Oxide.Core.Libraries.Covalence.IPlayer player, System.String command, System.String[] args) [0x00064] in <373266e1758d4944a791f75a47f935ce>:0 
  at Oxide.Plugins.RaidProtection.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x05360] in <373266e1758d4944a791f75a47f935ce>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <795304323ac74a298b8ed190a1dfa739>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0 

MK_

Posted

right now yes. but before the rust update everything works fine

 

Mr01sam

Posted

Just setup a fresh server with the latest version of oxide and tried this out - I'm not getting this error.

Can you provide your config so I can try that?

MK_

Posted

I already fixed it, it has something to do with economics plugin if we are going to use cash economics as payment for raid protection

fix at line 4714

 

if (config.Integration.Economics)
                {
                    if (IsNull(basePlayer)) { return false; }
                    
                    if (Economics == null)
                    {
                        Puts("Economics is not loaded!");
                        return false;
                    }

                    object balanceObj = Economics.Call("Balance", basePlayer.UserIDString);

                    if (balanceObj == null)
                    {
                        Puts($"Error: Could not retrieve balance for player with userID {basePlayer.UserIDString}. Balance is null.");
                        return false; 
                    }

                    double playersEco = (double)balanceObj;

                    if (playersEco < amount)
                    {
                        return false; 
                    }

                    var due = amount;
                    return playersEco >= due;
                }

Mr01sam

Posted

Ah, did economics plugin get an update?

MK_

Posted

yes I think so, same issue also with other plugins that depends on economics.

my temporary fix only fix the balance view for economics, but not the withdraw/deposit on your plugins. it won't be deducted upon protection

Robis

Posted

i dont use any cost ways. players have perma protection depends on permissions only, but after updates all broken, you can even click on button ui to open protection menu

Robis

Posted

NO ISSUES WITH ECONOMICS, ISSUES WITH UI AND BUTTONS

Robis

Posted (edited)

2 minutes ago, Robis said:

@Mr01sam NO ISSUES WITH ECONOMICS, ISSUES WITH UI AND BUTTONS

 

vfvfvfv.png

Edited by Robis
Mr01sam

Posted

Should be fixed in v3.4.8, thanks for the heads up guys.

Mr01sam

Posted

Changed Status from Pending to Closed

Changed Fixed In to 3.4.8

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

Files Sold

Total number of files sold.

2m

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.