Jump to content

TuxGeek

Member
  • Posts

    328
  • Joined

  • Last visited

Everything posted by TuxGeek

  1. I was having the following error. Below is the original code. I fixed it with the code block at the bottom Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.ExtraPlants+<>c__DisplayClass172_0.<OnItemUse>b__1 (Item i) [0x00000] in <53aaf18ed08c45948f9abc35c210e644>:0 at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate, System.Boolean& found) [0x0003f] in <30cb9806a8774f11bb35ea6b11076cb4>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00000] in <30cb9806a8774f11bb35ea6b11076cb4>:0 at Oxide.Plugins.ExtraPlants+<>c__DisplayClass172_0.<OnItemUse>b__0 () [0x0005d] in <53aaf18ed08c45948f9abc35c210e644>:0 at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <15f61ddda771464d8246ebdce8ff4811>:0 int originalAmount = item.amount; NextTick(() => { int usedAmount = originalAmount - item.amount; if (usedAmount <= 0) return; if (specialPlantGrowthFertilizers.Contains(item.uid)) { specialPlantGrowthFertilizers.Remove(item.uid); return; } Item existingFertilizer = planter.inventory.itemList .FirstOrDefault(i => i.info.itemid == item.info.itemid && i.skin == skinId && i != item); if (existingFertilizer != null) { int spaceInStack = existingFertilizer.MaxStackable() - existingFertilizer.amount; int amountToAdd = Math.Min(usedAmount, spaceInStack); existingFertilizer.amount += amountToAdd; existingFertilizer.MarkDirty(); usedAmount -= amountToAdd; } if (usedAmount > 0) { Item newFertilizer = ItemManager.CreateByItemID(item.info.itemid, usedAmount, skinId); if (newFertilizer != null) { if (!planter.inventory.GiveItem(newFertilizer)) { newFertilizer.Remove(); } } } planter.SendNetworkUpdate(); }); Below here is the fixed code int originalAmount = item.amount; ItemId itemUid = item.uid; int itemId = item.info.itemid; NextTick(() => { // item may have been fully consumed and returned to the item pool by now, // so don't touch item.info/item.amount here — use the values captured above. if (planter == null || planter.IsDestroyed) return; int currentAmount = (item != null) ? item.amount : 0; int usedAmount = originalAmount - currentAmount; if (usedAmount <= 0) return; if (specialPlantGrowthFertilizers.Contains(itemUid)) { specialPlantGrowthFertilizers.Remove(itemUid); return; } Item existingFertilizer = planter.inventory.itemList .FirstOrDefault(i => i.info != null && i.info.itemid == itemId && i.skin == skinId && i.uid != itemUid); if (existingFertilizer != null) { int spaceInStack = existingFertilizer.MaxStackable() - existingFertilizer.amount; int amountToAdd = Math.Min(usedAmount, spaceInStack); existingFertilizer.amount += amountToAdd; existingFertilizer.MarkDirty(); usedAmount -= amountToAdd; } if (usedAmount > 0) { Item newFertilizer = ItemManager.CreateByItemID(itemId, usedAmount, skinId); if (newFertilizer != null) { if (!planter.inventory.GiveItem(newFertilizer)) { newFertilizer.Remove(); } } } planter.SendNetworkUpdate(); });
  2. TuxGeek

    NRE Since wipe

    Changing all instances of "SetFlag" to "SetFlagLocal" fixed the plugin for me
  3. TuxGeek

    NRE Since wipe

    Im also having this compile issue. When can we expect an update for this plugin?
  4. I also have the latest version and am experiencing the compile issue
  5. TuxGeek

    Bright Nights

    Is there any update on when this will be fixed with facepunches changes? Ive been wanting to use it on my server again for a long time but with the admin time bug i cannot
  6. What does the embed for reports from this do differently from plugins like rustcord?
  7. TuxGeek

    Australia 4K

    Are there plans to update the map for the apartments update?
  8. TuxGeek

    Setup Furnaces

    i ran into this error below on the latest update to setup furnaces. to fix this a null check was added to burnable.info and burnable.info.itemmodburnable before touching.fuelamount. NullReferenceException: Object reference not set to an instance of an object Failed to call hook 'OnOvenCook' on plugin 'SetupFurnaces v2.3.16' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.SetupFurnaces.OnOvenCook (BaseOven oven, Item burnable) [0x00038] in <12833870f76d41829c51ebf98514c8f7>:0 at Oxide.Plugins.SetupFurnaces.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00575] in <12833870f76d41829c51ebf98514c8f7>: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 <15f61ddda771464d8246ebdce8ff4811>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0 Server Exception: BaseOven.BudgetedUpdate
  9. TuxGeek

    Update Checker

    Do you plan to add any other webhook types for things other than discord? I self host a mattermost server and would love to be able to use the plugin in a way to post the data to that instead of discord. Mattermost is 100% compatible with slack webhooks.
  10. TuxGeek

    NRE

    No admins at the time were using the gun either
  11. TuxGeek

    NRE

    I need to fix this error that started in the last few days. the server runs oxide Failed to call hook 'OnEntityTakeDamage' on plugin 'UberGun v1.1.3' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.UberGun.IsUberWeapon (BasePlayer player) [0x00048] in <6e056a7b0b274e72a3612e064116a7a5>:0 at Oxide.Plugins.UberGun.OnEntityTakeDamage (BaseCombatEntity entity, HitInfo info) [0x00043] in <6e056a7b0b274e72a3612e064116a7a5>:0 at Oxide.Plugins.UberGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00118] in <6e056a7b0b274e72a3612e064116a7a5>: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
  12. TuxGeek

    Purge started early

    any update on this bug?
  13. TuxGeek

    Backpacks plugin

    Everything is working now, thank you very much
  14. TuxGeek

    Backpacks plugin

    the buttons dont show up for any page but the first one and sometimes not even the first one at all
  15. TuxGeek

    Backpacks plugin

    Im still not getting it to show on any pages but the first
  16. TuxGeek

    Vending Machines

    I have attached the config VehicleBuy.json
  17. TuxGeek

    Vending Machines

    the vending machines at various locations like outpost, bandit, and fishing village all have nothing in them when enabled and sale of vehicles are enabled in the config. Im trying to use economics for the sales through the vending machines. The vending machines can be rotated by players too. What is going on here? i have a lot of plugins on my server and run oxide. I do have skill tree and customvendingsetup if that helps narrow down possible issues
  18. TuxGeek

    loot

    When the zombies are set to use its own loot table, i am getting items that are using paid skins. I do not see a way to disable the items being skinned even though i have the items set to the value below. How would i fix this? "Skin": 0,
  19. TuxGeek

    Backpacks plugin

    thank you very much
  20. TuxGeek

    Purge started early

    My server has wipe the first and third thursday of each month. purge the last 24 hours of wipe
  21. TuxGeek

    Purge started early

    Currently my server started purge a week early, its the first week of the month but i have my server set to use the 2nd and 4th week for purge. I have it set to start at 10am PST and the plugin started purge today at 9am PST. What would cause this?
  22. TuxGeek

    Backpacks plugin

    thank you, its ok, i know its the holidays. Just wanted to make sure you knew what was going on. I know that backpacks plugin is pretty common on pve servers and some servers ive seen have up to 10 pages.
  23. TuxGeek

    Backpacks plugin

    It works on one page still but not on more than one page from the backpacks plugin
  24. TuxGeek

    Backpacks plugin

    That is the plugin from umod.org Backpacks https://umod.org/plugins/Backpacks

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.1m
Total downloads
Customers
12.1k
Customers served
Files Sold
172k
Total sales
Payments
3.7m
Processed total
×
×
  • 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.