chardragon Posted September 22, 2023 Posted September 22, 2023 I am using if(inventory.contains("Bruma root")){ log("amt: " + inventory.getItem("Bruma root").getAmount()); } However, it always returns 1 regardless of the number of items for example I have 5.
Delivery Posted September 22, 2023 Posted September 22, 2023 7 minutes ago, chardragon said: I am using if(inventory.contains("Bruma root")){ log("amt: " + inventory.getItem("Bruma root").getAmount()); } However, it always returns 1 regardless of the number of items for example I have 5. getInventory().getAmount("Bruma root") 1
Khaleesi Posted September 22, 2023 Posted September 22, 2023 (edited) 2 hours ago, chardragon said: I am using if(inventory.contains("Bruma root")){ log("amt: " + inventory.getItem("Bruma root").getAmount()); } However, it always returns 1 regardless of the number of items for example I have 5. That's because you are checking the amount of that specific object in your inventory Would ahve worked if the item was stackable What @xcx said is correct Edited September 22, 2023 by Khaleesi