Crash with back button in entry with changing page number
Da-Technomancer opened this issue ยท 0 comments
I PRed something a while ago to fix a similar bug, but this bug is for a different button I missed before.
If an entry is changed (be it between launches due to updates) or while the game is running (by something overriding the onInit method in Entry) so it has fewer pages than the page number the player was on when they last closed the entry (so the player re-opens the book onto the entry on a page that no longer exists), and presses the back button (specifically the button on the top left of the page, though there are likely other buttons/clicks that will cause this), the game crashes. Here is the relevant portion of the log: https://pastebin.com/5tTLcu6C
This should be fixable with either some try-catch statements or some basic if statements, but they would quite likely have to be placed in several locations to catch all the issues. Another possibility is to force an entry to push a player back to page 1 if the player opens to a no longer existing page.