EO [2.0] Buy Item Fix

If you were buying an item in a shop that costs 10 gold coins, of which you have 30 of, and the rest of your inventory was filled with other items, the transaction would still go through, but because you don’t have enough room in your inventory, the item is lost.

Right above

	    TakeInvItem index, .costitem, .costvalue

	    GiveInvItem index, .Item, .ItemValue

put there

		 If FindOpenInvSlot(index, .Item) = 0 Then

		    Call PlayerMsg(index, "You don't have enough room in your inventory!", BrightRed)

		    Exit Sub

	    End If

Thanx work 😆

Make sure you pasted the new code above the two lines that handle taking the cost item and giving the item.

Good! thank you

Log in to reply