InventoryGui icon indicating copy to clipboard operation
InventoryGui copied to clipboard

CalculatePageAmount

Open drolpi opened this issue 3 years ago • 8 comments

Used Version

LATEST

What is happening?

I use the Inventory System to create an inventory with several pages. I use a GroupElement and there I add staticitems. However, 2 pages exist although the slots of the group are not full. In addition, the second page is equipped with the same items as page 1. If I make the slots of one page full and a few on the second page, it works with the pages. This means that the calculatePageAmount method does not work.

Additional context

Page 1: https://prnt.sc/11x6lr7 Page 2: https://prnt.sc/11x6m64

drolpi avatar Apr 23 '21 12:04 drolpi

  1. "latest" is not a version, please provide the exact version or even build that you are using.
  2. Please provide some code example.

Phoenix616 avatar Apr 23 '21 12:04 Phoenix616

Here ist the code. https://hatebin.com/pwmzwzysgo And i use the code from the master branch

drolpi avatar Apr 23 '21 12:04 drolpi

Hm, you are nesting dynamic elements inside of o dynamic element, that might be what is causing that behaviour. Such a setup is not necessary as the outermost dynamic element will already re-generate the full inner element so can you test removing the innermost dynamic element and see if that already solves it?

Phoenix616 avatar Apr 23 '21 12:04 Phoenix616

No, unfortunately that does not solve the problem Here is my new code: https://hatebin.com/qqkjmpjnjd

drolpi avatar Apr 23 '21 12:04 drolpi

Do you need more information?

drolpi avatar May 04 '21 15:05 drolpi

Seeing as the issue isn't happening for me, yes.

Phoenix616 avatar May 04 '21 15:05 Phoenix616

Okay, what else do you need?

drolpi avatar May 04 '21 15:05 drolpi

Full plugin (code) would be the easiest to debug this with, otherwise you are going to have to provide an extremely simple example which can reproduce this behaviour. (Because I can't create one that does)

Phoenix616 avatar May 04 '21 15:05 Phoenix616