kyunghei / Timeless-Tales

A web application utilizing AI to create custom choose-your-own-adventure stories with dynamic choices/outcomes and relevant artwork.
2 stars 0 forks source link

Backend bugfix #63

Closed ShinyMyst closed 3 months ago

ShinyMyst commented 3 months ago

Possibly fixes the bug? First time I ran into a new crash because story kept going after the end. Second time I did not crash but it still kept going. I think the front-end update stops story at the end, so neither of these scenarios should occur.

All I did was add a function that populates choices in main if there are missing choices. This solves the crash.

BUT the question is why that needs to be done in the first place. Tracing it back, three choices were created with the split_choices function (using the old fail safe) and these choices are assigned the same way they are for every other beat. Why there would be missing ones on the final beat, I do not know and haven't figured out.