Thank you, that makes that a lot clearer. My next question is how best to, I guess, skip integers that correspond to weapon slots that are currently empty.
In my case, the player starts with only a sidearm that takes up slot number 2 (and I guess by extension would make it integer 1). Then as other 5 item slots are filled, more and more of the integers would become available. The only way I can think of to do this is a big mess of branches depending upon what value the integer would be placed at upon incrementing/decrementing and whether or not X slot is filled and if it’s empty increment/decrement the integer again, but this seems like it’s not the optimal way of going about this.