Gyoo / LiveSplit.SplitsBet

GitHub for the LiveSplit plugin SplitsBet, the bot that makes the viewers play with the runner
8 stars 10 forks source link

Reinit SplitsBet when new splits are loaded #52

Closed Gyoo closed 9 years ago

Gyoo commented 9 years ago

SplitsBet initializes all its variables when it's first loaded, but if you change your splits without changing the layout, then the previous data is kept, and the arrays don't have the right size anymore. It's error-heavy if you switch from a file with few splits to another file with lots of splits because the indexes will go out of bounds and even if I'm a speedrunner I don't want OoBs in my plugin :P The other way, if you switch from longer to shorter splits, the bot will not stop at the end of the run because you didn't reach the end of the array.

@CryZe this one is for ya ;)