Players getting kicked when using guns taken from the second page and after backpackFixed

Players are getting kicked with a NullReferenceException for BaseProjectile.AddAmmoOption(ItemDefinition ammo,.... when they reload/use guns pulled from the second and higher pages of their backpacks.NullReferenceException

I just tested and was unable to reproduce this issue. To test, I removed all ammo from page 1, placed rifle ammo in page 2, enabled retrieve for page 2, then shot and reloaded an m429 just fine. I also tried switching between normal and explosive rifle ammo in page 2. Off the top of my head, I don't know what could cause that error, especially since it's a client-side error, so I will need more information about how players are triggering it.

same issue that or items from 2nd page stop working all together cant be used reloaded etc

Merged post

image.png

So i think what is happening is the item that is given has no ammo type so by default it is set to 0 and tries to find the ammo type from that item id which does not exist.
 
This below would prevent that from happening again

image.png

image.png

it has to be a weapon that is spawned in without any ammo in it for it to be a thing and put straight into a backpack.

for me players find guns with 0 ammo in alphaloot all over map in different containers ie hackcrates, woodboxs etc and then stote them in there backpack until they wanna use them in which they get the following errors.

Arthatus2018

same issue that or items from 2nd page stop working all together cant be used reloaded etc

Merged post

image.png

So i think what is happening is the item that is given has no ammo type so by default it is set to 0 and tries to find the ammo type from that item id which does not exist.
 
This below would prevent that from happening again

image.png

image.png

it has to be a weapon that is spawned in without any ammo in it for it to be a thing and put straight into a backpack.

for me players find guns with 0 ammo in alphaloot all over map in different containers ie hackcrates, woodboxs etc and then stote them in there backpack until they wanna use them in which they get the following errors.

The issue on my server matches your issues. The most recent patch appears to have fixed it. I will update if it appears again

I'm getting the same issue after the latest update...

I have the latest version of Backpacks and it has this patch but players are reporting they cannot use or equip items from the backpack and if I reload the plugin the items will work again..

Arthatus2018

same issue that or items from 2nd page stop working all together cant be used reloaded etc

Merged post

image.png

So i think what is happening is the item that is given has no ammo type so by default it is set to 0 and tries to find the ammo type from that item id which does not exist.
 
This below would prevent that from happening again

image.png

image.png

it has to be a weapon that is spawned in without any ammo in it for it to be a thing and put straight into a backpack.

for me players find guns with 0 ammo in alphaloot all over map in different containers ie hackcrates, woodboxs etc and then stote them in there backpack until they wanna use them in which they get the following errors.

UkTXfSADR29BEFB jayson

I'm getting the same issue after the latest update...

I have the latest version of Backpacks and it has this patch but players are reporting they cannot use or equip items from the backpack and if I reload the plugin the items will work again..

Do you have the Broken Items Cleaner plugin? It's not compatible and will cause that issue for any weapons in pages 2+.
NKXTQs24ExGTuL8.jpg WhiteThunder
Do you have the Broken Items Cleaner plugin? It's not compatible and will cause that issue for any weapons in pages 2+.

Oh that is unfortunate :/ I have that plugin

Locked automatically