bump
|
I've added the base for a bag system, after finishing it I have realised that there is a part I have done incorrectly... After spending too much time on this error I thought that I would ask the community here for any suggestions.
Here is the code and below is what happens right now.
Here it what happens, when the player has over 1 of an item in the loot bag and clicks the bag to see what is inside it, then it will print how many of that item is in the players inventory and not in the loot bag itself.Code:if (itemId == 10834) { if (c.getPA().getTotalBagItems() > 0) { for (int i = 0; i < c.bagItems.length; i ++) { int modifiedSlot = i + 1; if (c.bagItems[i] == 0) { return; } if (c.getItems().getItemCount((c.bagItems[i])) == 0) { c.sendMessage("You have one "+c.getItems().getItemName(c.bagItems[i])+ ""); } if (c.getItems().getItemCount((c.bagItems[i])) > 1) { c.sendMessage("You have "+c.getItems().getItemAmount(c.bagItems[i])+ ""+c.getItems().getItemName(c.bagItems[i])+ ""); return; }
bump
Isnt this code:
basically this?Code:c.getItems().getItemAmount(c.bagItems[i])
^so theres where u are failing.Code:Inventory.getItemAmount(itemId)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |