Buying 2 of everythingSolved

I don't know if this is a bug with this plugin, but since this plugin affects vending machines/vendors, I thought I'd ask... If a player has enough scrap to buy more than 1 of an item from a vending machine or vendor, they end up buying 2 of it. Is this a plugin issue or a Rust issue?

I haven't heard of this issue before.

When you saying "buying 2", do you mean the player is recieving 2x the base amount, or 2x the amount they requested (i.e., double the amount they request)? Are players also being charged 2x?

My guess is that this is caused by another plugin that is handling the transaction logic in the OnVendingTransaction hook.

NKXTQs24ExGTuL8.jpg WhiteThunder

I haven't heard of this issue before.

When you saying "buying 2", do you mean the player is recieving 2x the base amount, or 2x the amount they requested (i.e., double the amount they request)? Are players also being charged 2x?

My guess is that this is caused by another plugin that is handling the transaction logic in the OnVendingTransaction hook.

They are paying for and receiving 2 instead of 1. For example, "Item A" costs 10 scrap. The player has 30 scrap. When they buy "Item A", then end up with 2 of them and 20 scrap is taken. The other vending plugin I use is "Vending Manager". Could that be the cause?

Yes, both Custom Vending Setup and Vending Manager completely override the transaction handling, so they are both attempting to carry out the transaction.

That's unfortunate. I use Vending Manager to give unlimited items on some vending machines that I place. 

Vending Manager could probably be updated to ignore any vending machine customized by Custom Vending Setup. This plugin has an API method called API_IsCustomized which can be used to determine that.

I've gone ahead and submitted a patch to Vending Manager to do what I described above (ignore vending machines customized by Custom Vending Setup). Pending review from the Vending Manager maintainer.

Sorry for using translation.

 

The same symptoms are happening now on my server.

I am using 2.7.0.

Locked automatically