Prrsha
Cowpoke
Times like these remind me of the art and complexity of coding. Like in life there are so many paths or ideas to get to a desirable result. Some can be longer or some can be shorter… just always remember to terminate your code after. XDTo add to this to hopefully get it fixed in the next patch (1.6.9 soon pls?):
This crash occurs when collecting the rewards but I believe the bug itself is in the OnRaceWon function. Specifically this section here:
If you get the special reward for the first time in a day racer 3 wins, then it doesn't set the key to collect rewards, and as a bonus it also doesn't set you as a winning farmer just below. This then causes the crash when in CollectRacePrizes it tries to obtain the value this.rewardsToCollect[Game1.player.UniqueMultiplayerID].Code:if (winner == 3 && !this.specialRewardsCollected.ContainsKey(kvp.Key)) { this.specialRewardsCollected[kvp.Key] = false; continue; } if (!this.rewardsToCollect.ContainsKey(kvp.Key)) { this.rewardsToCollect[kvp.Key] = 0; } this.rewardsToCollect[kvp.Key]++;
As this was not set as the loop was exitted prematurely, it causes the crash.
I think it would be better if the code was changed to:
That way the key is set, so no crash, and the rest of the code in the loop runs to set you to be a winning farmer.Code:if (!this.rewardsToCollect.ContainsKey(kvp.Key)) { this.rewardsToCollect[kvp.Key] = 0; } if (winner == 3 && !this.specialRewardsCollected.ContainsKey(kvp.Key)) { this.specialRewardsCollected[kvp.Key] = false; } else { this.rewardsToCollect[kvp.Key]++; }
Nice work around btw…