Jump to content

Consistent errors in console

Pending 1.2.2

SLATE
SLATE

Posted (edited)

I've been getting these on occasion:

(16:22:01) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:22:01) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122
(16:23:03) | Failed to call internal hook 'OnLootSpawn' on plugin 'CustomLoot v1.2.2' [767976070] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.CustomLoot.OnLootSpawn(LootContainer container) in carbon/plugins/CustomLoot.cs:line 215
   at object Oxide.Plugins.CustomLoot.InternalCallHook(uint hook, object[] args) in CustomLoot.cs/Internal:line 122

As far as I can tell, its just some random bug that I haven't been able to find the root cause for.  I put a simple patch into your code to prevent it, so i wanted to send it over just in case it might help others:

This is line 211-214:

        void OnLootSpawn(LootContainer container)
        {
            if (!loaded)
                return;

Right after 214, add:

            if (!container)
                return;

Clearly it's getting something that isn't a container that throws the error, and breaks out of the function, so its not populating whatever it is with look. This prevents it from filling the console with that error.

Edited by SLATE
  • Like 1
1.7m

Downloads

Total number of downloads.

8k

Customers

Total customers served.

120.4k

Files Sold

Total number of files sold.

2.5m

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.