"Warning: league_team_movements_assign_dest." error

Here you can... report bugs. Open a new thread for each bug, please.
Post Reply
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

"Warning: league_team_movements_assign_dest." error

Post by will_the_canuck »

Hello. While in the process of trying to create some new definitions for the North American country USA, after fixing two errors that I missed, on my third attempt, I came across this error of "Warning: league_team_movements_assign_dest". This error occurred when cycling the seasons from the last week of season one to the first week of season two. The game crashed and produced this error.

When starting the saved game during the last week (week 51) of season one and progressing to week one of season two, I got similar yet different error messages for the same error. The first error message was "Warning: league_team_movements_assign_dest: no room in league NPSL Mid-Atlantic Division for team Monmouth." The second warning message was "Warning: league_team_movements_assign_dest: no room in league PDL South Atlantic Division for team Nashville."

For some perspective, the above errors are being produced after a promotion and relegation play-off between 8 teams between the USL division and the related PDL and NPSL divisions. The promotion and relegation play-offs are divided into east and west regions, where the three tiers only play the related teams in their region for promotion and relegation. So for the MLS and USL promotion and relegation, teams from MLS East and USL East will face off against each other and MLS West and USL West will face off against each other. As for USL and PDL and NPSL, it is USL East face off against the winners of PDL Eastern Conference and Southern Conference and NPSL Northeast Conference and South Conference. The USL West will face off against the winners of PDL Central Conference and PDL Western Conference and NPSL Midwest Conference and West Conference. But then, each conference in the PDL and NPSL has either 2, 3 or 4 divisions in them, so that the PDL and NPSL East has 13 divisions and PDL and NPSL West has 11 divisions.

So with this example that is causing the error, the error is from the USL and PDL/NPSL East Promotion and Relegation Play-off. Since it is the first one that reports, it could be assumed that the west promotion and relegation play-off may produce errors too.
The eight teams in this play-off are: from the USL East (New York R.B. 2, Louisville City, Tampa Bay R., and Nashville), PDL East Conf. (Boston B.), PDL South Conf. (Tri-Cities O.), NPSL Northeast Conf. (Monmouth), and NPSL South Conf. (Wichita).
The order in which they finished from first to last is as follows:
(1) Tampa Bay R. (2) Louisville City (3) Tri-Cities O. (4) New York R.B. 2
(5) Wichita (6) Monmouth (7) Boston B. (8) Nashville

As only Tri-Cities O. and Nashville would be switching places in this example, even mentioning Monmouth makes no sense as it is presumed that although a team made it so far, if nothing was changing, it should go back to the division it started in at the beginning of the season. With relation to the first error message of Monmouth and the league NPSL Mid-Atlantic Division, Monmouth is part of the NPSL Northeast Conference which has three divisions in them: North Atlantic, Mid-Atlantic, and Keystone. Monmouth plays in the Keystone Division and therefore has nothing to do with the Mid-Atlantic Division.

Additionally, with the second error message of Nashville and the league PDL South Atlantic Division, that division is part of the PDL Eastern Conference which has three divisions in them: Northeast, Mid Atlantic and South Atlantic. The representative in the promotion and relegation play-off from the PDL Eastern Conference was Boston B., not Tri-Cities O., who qualified to be promoted. Tri-Cities O. is from the PDL Southern Conference in the Deep South Division. So as for the second error message, they are trying to put a team in a division that hasn't changed and therefore has no space for them.

So I guess that is my dilemma up to this point, among another issue to work on, that being a <delay> tag issue and how to get the play-offs working the way I want them to and having them play on the weeks I want them to instead of how they are being played now. So with this issue of the "league_team_movements_assign_dest." error, hopefully you can help rectify it or at least advise if this is a fixable error or not. I guess it is assumed that if a team comes out of one division, then that division has a free space. Therefore a team can be put in there. Although with my example, as I've got two upper divisions and 24 lower divisions (11 and 13 respectively), maybe the numbers aren't quite working out as not every lower division will send a representative to play against an upper division but only one winner of each region in the lower division can send a representative. Maybe I have to adjust the loser sid to include the conference final instead of each individual division in the lower divisions??

Hopefully you guys can help me out on this one. :)

Thanks in advance,

will_the_canuck

PS - Please find attached the saved game file that shows this error message and my definitions that I'm using that created this error.
Attachments
United_States-Calgary_F.zip
saved game creating this error message
(654.1 KiB) Downloaded 194 times
united_states_bygfoot_definitions.zip
(30.92 KiB) Downloaded 175 times
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: "Warning: league_team_movements_assign_dest." error

Post by will_the_canuck »

Hello All.

Well, I'm posting an update to some of the posts I've made that were issues that I overcame and may have created solutions for, so as to either help inform the developers in making the game code better or helping other users understand the issue better, just in case they are also experiencing the same problems I had. :)

As for this issue of "league_team_movements_assign_dest." error, I do have a better understanding of the circumstances. From reading what I wrote and understanding the definitions and what I was going for / trying to accomplish, this is an issue where I was dealing with two upper tier conferences (2 league files) and 24 lower tier divisions (24 league files). From the lower tiers, the 24 divisions were then divided into 8 regional finals (8 cup files), of which those 8 winners would then face off against 8 teams from the upper tier, but in separate regions of east and west (8 teams in east and 8 teams in west). The promotion and relegation competition between the respective regions and tiers were separate cup files from the lower tiers' regional finals. I guess when I think of it, if the system was better coded, this error shouldn't or wouldn't have happened since it would hopefully only note which teams were moving and from which division(s) or conference(s) the teams were from. But because the way I had to code the loser_sid for the promotion and relegation coding in the league files for the upper tiers, I had to include all the affected divisions, just in case a team from that division actually got promoted to the upper tier. So when it came across a division that hadn't changed and no team moved out from it, it gave this error message for when trying to relegate an upper tier team to the lower tier division and stopped the program.

I wonder if potentially, coding could be added to tell the program to progress to the next option in the list if the one choice was full or not available. Kinda like having a list of 10 names and going through them one by one and only have 4 names to match. Not all names will match but only 4 will. I guess this is for some future considerations but then, I won't fault the developers on this one as really, I kind of put a stress test on the code by having used 24 lower tier divisions and only 2 upper tier conferences. These are situations that the developers likely could never predict anyone would use as having so many lower tier tables in a soccer/football league is likely unheard of.

What I eventually did to resolve or work around this issue was to change the 24 lower tier divisions into 8 regions and have them each produce one winner. I would then have those 8 winners go against 8 teams from the upper tier, in separate regions of east and west, and the top 4 teams in each region would get promoted and the lower 4 teams would get relegated. By having a similar amount of teams as the same number of lower regions represented, it made the promotion and relegation easier. An example of this system working can be found in my USA definitions update, versions 1 or 2. Although this workaround did work, it was not the intent that I originally wanted for these definition files. So, I worked on it again and actually resolved the issue, to a point, that kept the integrity of my original intent.

How I got the definitions to work with my original intent was to have a team from all 24 lower tier divisions compete in a cup file in one round. After that round was complete, 8 teams advanced from the first round and then competed against 8 teams from the upper tier conferences, all while in the same cup file, although divided by the regions of east and west. So for my example, I had 13 lower tier teams loaded into one cup file (east), of which 4 teams would advance, and then 4 teams from the upper tier would compete against the winners. The 4 winners of that cup file would advance to the upper tier and the 4 losers would be relegated to the lower tier. The second cup file (west) would have 11 lower tier teams loaded and competing, of which 4 teams would advance to the second round, where they would meet 4 other teams from the upper tier. And the winners and losers would be promoted and relegated like the first cup. Because I had all relevant teams (32) loaded into the cup files that represented the relevant divisions and conferences involved (24 lower and 2 upper), when it came to the promotion and relegation system and the coding involved for the upper tiers' league files, it worked. It wasn't my desired way to have it done but it worked and also provided a little bit more excitement I think. You can try out my solution in my USA definitions update, version 3.

So although I think my problem originally was unique in a way because of the sheer number of teams (conferences and divisions) I was dealing with, I was able to work around it. And really, I don't think so many people will work with nearly as many divisions or leagues as I was in this example. But if you are also dealing with this type of problem, hopefully you can learn from my mistakes and even my experience with this problem and work around your own problems to resolve your issues in how you want to see them done. The key is understanding what the problem truly is and how to fix or resolve it within the tools available to us.

And on that note, I'll wish you well and say good bye for now,

will_the_canuck
will_the_canuck
Posts: 141
Joined: Tue Jan 16, 2018 5:54 am
Location: Canada

Re: "Warning: league_team_movements_assign_dest." error

Post by will_the_canuck »

Hello again.

Well, I created a new set of definitions for the USA definitions using the same conferences and divisions but instead of three (3) tiers, I created a four (4) tier definition this time, also with promotion and relegation systems. So for this definition, I have the tiers as follows: (1) MLS East and MLS West; (2) USL East and USL West; (3) PDL (11 divisions in 4 regions); and (4) NPSL (13 divisions in 4 regions). A sample of the coding for the promotion and relegation that is found in this set of definitions for promotion and relegation between the PDL and NPSL is as follows:

Code: Select all

<!-- PDL - NPSL Promotion / Relegation - Central Region -->
	<prom_rel>
		<prom_games>
			<prom_games_dest_sid>usa_ver4_3a01 usa_ver4_3a02</prom_games_dest_sid>
			<prom_games_loser_sid>usa_ver4_4a01 usa_ver4_4a02 usa_ver4_4a03</prom_games_loser_sid>
			<prom_games_number_of_advance>2</prom_games_number_of_advance>
			<prom_games_cup_sid>usa_ver4_pdl_npsl_prom_cent</prom_games_cup_sid>
		</prom_games>
	</prom_rel>
I have similar code in the league files for tiers 1 and 2 to represent the promotion and relegation between tiers 1 and 2 and tiers 2 and 3 respectively. For the code to represent the promotion and relegation between tiers 3 and 4, I had it in the tier 2 league files, to keep it neat and together, but it failed. When I put the code for the tiers 3 and 4 promotion and relegation in the league files for tiers 3 and 4, the error message of "league_team_movements_assign_dest." also occurred after I tried to cycle from season one (1) to season two (2). I lastly tried putting the promotion and relegation code between tiers 3 and 4 in the tier 1 league files and it appeared to work. I guess this relates to how the league files are called as tier one is called first and tier two is called second. Also, between tier one (1) and tier two (2), there are two teams battling for promotion in each conference. One wins and one loses of which the winner gets promoted to tier one and the loser get relegated to tier two. Between tier 2 and tier 3, there are either 7 or 8 teams battling it out for promotion for each conference / division. Two teams from each conference battle will win promotion and either 5 or 6 teams will lose and be relegated to the equal amount of divisions in the lower tier that they will be relegated to. Between tiers 3 and 4, the teams from 11 tier 3 divisions will do battle with 13 tier 4 divisions in four regions, having between 5 and 7 teams in each region.

The issue was that when the promotion and relegation would take place, as the new season was being cycled and the results were being applied, tier three would have 22 open spaces available (each division would have the top and bottom teams playing in a promotion and relegation contest) among 11 divisions. As the promotion and relegation contests between tiers 2 and 3 would be settled first, some of those divisions received two teams instead of just one. And when it came time to settle the results between the contests of tiers 3 and 4, some divisions in tier 3 were already full and the system would create an error and stop right there. The only way it seemed to resolve this issue was to have the promotion and relegation code for the contests between tiers 3 and 4 come before the promotion and relegation code for the contests between tiers 2 and 3. So for that, I put the code in the league files of tier one as they are loaded or read before the league files of tier two.

So although my solution kind of works a little, it doesn't quite resolve the issue as still, for tier three, some divisions have two teams from tier four that advanced and none from tier two that were relegated and others have no teams from tier four that advanced and two from tier two that have been relegated. Because my ratio of teams is many to many (x:x) instead of one to many (1:x) or even one to one (1:1), this is what is happening as an outcome. I guess to improve this feature, coding would have to be added or implemented to do a count feature and only allot the number of spaces as per teams available and once that allotment is met, give it a value that will not accept more allotments and force it to fill the other spaces, for both promotions and relegations.

As I did post a working copy of my usa_ver4 definitions under the Definitions section for the new USA definitions for 2018, any additional files needed to run the definitions here can be found there. I didn't feel it was necessary to add them here as they are already available in another thread. The included definitions here have the promotion and relegation code between tiers 3 and 4 in the relative tier 4 league files. Now how many people may experience an issue like this, I have no idea, but it is giving me a better insight on creating definitions of this nature. It is still annoying though. :) So hopefully the code can be better worked on to stop this kind of error from happening in the future, whenever the bugs can be worked on.

Take care for now and have fun.

will_the_canuck
Attachments
usa_ver4_definitions_-_failed.zip
(35.61 KiB) Downloaded 170 times
Post Reply