Fixed "undefined - undefined" bug


There have been a few reports recently of an “undefined - undefined” bug. This usually means that something in the game generated an invalid card. When the game tried to render the card it shows “undefined - undefined” instead of a name and description.

Here’s a picture of the bug as reported by inquistior80, thanks for the bug report!

an invisible card with the name undefined and description undefined

This sort of bug can be tricky to track down. It doesn’t actually break the game at the moment something went wrong (when the invalid card was generated). It tells us that somewhere while playing the game something generated an invalid card.

There are two fixes I added to version 2.0.1 to tackle this.

  1. Any time an invalid card is about to be added to the deck, we log it in the console and then remove it. Hopefully, this should at least prevent this type of issue from locking the game in the future.

  2. I noticed that when a quarry is placed next to nothing and should generate no tiles it instead generates an undefined tile. This seems to be the source of the broken card causing issues. However, I cannot be positive another one is not lurking somewhere.

Hopefully together these two changes will keep y’all Island Makering to your heart’s content though! Thanks for playing and caring enough to report bugs. ❤️

island maker version 2.0.1 main menu

Files

island-maker-html.zip Play in browser
Version 8 May 29, 2022

Leave a comment

Log in with itch.io to leave a comment.