Jump to content

Error on the plugin

Pending 1.0.5

xlr8tednergy
xlr8tednergy

Posted

I havent noticed any degredation to the plugin, but here is the error im seeing 

image.png

Theswingingturtle

Posted

On 10/5/2025 at 10:16 PM, xlr8tednergy said:

I havent noticed any degredation to the plugin, but here is the error im seeing 

image.png

looks like I have the same
Failed to call hook 'OnStructureDemolish' on plugin 'Basements v1.0.5' (NullReferenceException: Object reference not set to an instance of an object.)
  at Oxide.Plugins.Basements.OnStructureDemolish (BaseCombatEntity entity, BasePlayer basePlayer, System.Boolean immediate) [0x00034] in <5db307b224244f6e896886760da57b6e>:0 
  at Oxide.Plugins.Basements.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002b7] in <5db307b224244f6e896886760da57b6e>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <112d89ea5d3348c8b949af0ab1a866d2>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <112d89ea5d3348c8b949af0ab1a866d2>:0 


I did give a friend on the server a basement without permission on him, could that be it?

xlr8tednergy

Posted

I'm not 100%, it just seems to be a recurring error with nothing I can figure out triggering it. I'll keep my eye out though for sure

 

Theswingingturtle

Posted

Is developer aware or of it? Can you maybe share a discord or something?

It's starting to show more often in console. 😞

Theswingingturtle

Posted

It's when players demolish stuff with the hammer, with or without permission. Heres a temporary fix untill developer makes a better fix.

Change this:
 

void OnStructureDemolish(BaseCombatEntity entity, BasePlayer basePlayer, bool immediate)

        {

            if (entity == null || basePlayer == null || !(entity is BuildingBlock)) { return; }

            var entityid = entity.net.ID.Value;

            NextTick(() =>

            {

                if (KilledEntity != null && KilledEntity.Value == entityid)

                {

                    basePlayer?.SendConsoleCommand("gametip.showtoast", 1, Lang(basePlayer, "toast basement destroyed"), string.Empty);

                    KilledEntity = null;

                }

            });

        }



To this:
 

void OnStructureDemolish(BaseCombatEntity entity, BasePlayer basePlayer, bool immediate)
{
    if (entity == null || basePlayer == null || !(entity is BuildingBlock))
        return;

    if (entity.net == null)
        return;

    var entityid = entity.net.ID.Value;
    NextTick(() =>
    {
        if (KilledEntity != null && KilledEntity.Value == entityid)
        {
            basePlayer?.SendConsoleCommand("gametip.showtoast", 1, Lang(basePlayer, "toast basement destroyed"), string.Empty);
            KilledEntity = null;
        }
    });
}

2m

Downloads

Total number of downloads.

9.4k

Customers

Total customers served.

137.3k

Files Sold

Total number of files sold.

2.9m

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.