hi XJ,
I have to admit I did not evaluate the entire code, but at first glance you need to do 2 things...
First of all, cap the teamsize at 15, by replacing:
with:
Which then will introduce a new problem, since a lower part of the code is designed to keep looping until it runs out of players (indirectly)? Of course not all players are guaranteed a spot if you limit the team size to 15 (if there are 8 teams for example and 150 available players. For that you can just exit the for loop if the team quantity is reached (the line in red does this):
Bookmarks