That is the source of the error. Per my post above, i is out of bounds because it is being set to the length of the type array rather than being set incrementally through the for loop.
Type: Posts; User: WhiteSoup12
That is the source of the error. Per my post above, i is out of bounds because it is being set to the length of the type array rather than being set incrementally through the for loop.
The text in red needs to be removed. Your for loop is moving through i (which starts at 0) incrementally. When you set i to the length of the type array, you're messing up that for loop.