Thanks for your update. I agree I think the Z depth is just causing confusion for me. I will remove it and just use XY.
The thing is My inventory is 36 slots. 9 wide 4 high. If a line gets full how do I make it check the next line for an empty slot? I thought I needed an additional loop for Height? When I did a test it did not automatically move to the next line.
I can get it working right if I remove the height and just have a width but when that row is full (9 slots) it does not add to the next row. So I was trying to add a condition and a height check so I could change rows when item slots on the first row are full.
But when I did that it just added items to every single empty spot in the first position of each row. So I think my logic was wrong.
It's working now for the first row. Thanks for your help. I'm just now struggling to figure out how to move it to the next row when that one is full.
I still have to set yp my Items menu looool. Really hoping I can copy and paste this set up and just rename things cause this has been so confusion for me. And everything was going so well until these menus!