Jump to content

Cant craft Industrial Recycler

Pending 1.8.94

xkirax20ax
xkirax20ax

Posted

Hello,

A NullReferenceException occurred when a player attempted to purchase an Industrial Recycler.

Plugin version:
IndustrialRecycler v1.8.94

Error:

Failed to call hook 'ConfirmPurchaseIndustrial' on plugin 'IndustrialRecycler v1.8.94' NullReferenceException: Object reference not set to an instance of an object

The stack trace points to the following methods:

IndustrialRecycler.RemoveItems(...) IndustrialRecycler.CheckAndRemoveBuyItems(...) IndustrialRecycler.ConfirmPurchaseIndustrial(...)

The Industrial Recycler purchase cost is currently configured with multiple item types:

Scrap: 1,000

High Quality Metal: 50

Metal Fragments: 1,000

The issue may be occurring while removing multiple required item types from the player's inventory.

In RemoveItems(), it appears that both player.inventory.Take(...) and item.Remove() are being called for the same item stack.

This may leave an invalid reference to an already removed item in the previously collected item list, which could then cause a NullReferenceException when item.info.shortname is accessed during the next iteration.

Could you please check this issue?

Thank you very much for your continued support.

image.png

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
2.7m
Total downloads
Customers
11.6k
Customers served
Files Sold
165.3k
Total sales
Payments
3.6m
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.