kanethemediocre / BlingHustle

Open sauce 2d space adventure
GNU General Public License v3.0
0 stars 0 forks source link

Rare Undefined error in shop class blocking menu/GUI #48

Open kanethemediocre opened 12 months ago

kanethemediocre commented 12 months ago

while (i<this.inv.length-1){ names.push(this.inv[i].namestring().slice(0,20)); //This line in shop class thows error

Threw error every frame claiming this.inv[i] was undefined, despite being inside a while loop requiring that it be defined.

Not repeatable generally, occurred after loading save file, then travelling up from 35 to 118 (neighboring system, also last in the stack) and interacting with the shop there. The "Buy" menus threw the error, other menus did not. Was escapable, and was repeatable within that generated world.

kanethemediocre commented 8 months ago

Possible fix implemented a while ago with "economy" functions possibly adding undefined cargo items. Not seen recently.