jopeek / fvtt-loot-sheet-npc-5e

FVTT - Loot Sheet NPC 5E
MIT License
44 stars 85 forks source link

'Generate loot' button does nothing (error log) #345

Open DangrBoy opened 2 years ago

DangrBoy commented 2 years ago

Per the title, clicking the jewel 'Generate loot for the selected token(s)' does nothing. Nor does dropping a a new NPC onto the map after checking the 'Generate currency' check box (but that may be 'cos I don't have a table linked?)

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'collection') [Detected 1 package: lootsheetnpc5e] at fromUuid (foundry.js:2556:40) at LootSeeder.seedItemsToActors (LootSeeder.js:29:27) at onCreateToken (LootsheetNPC5eHooks.js:143:26) at Hooks._call (foundry.js:294:14) at Hooks.callAll (foundry.js:253:12) at ClientDatabaseBackend.callback (foundry.js:10105:13) at foundry.js:10075:43 at Array.map () at ClientDatabaseBackend._handleCreateEmbeddedDocuments (foundry.js:10075:33) at ClientDatabaseBackend._createEmbeddedDocuments (foundry.js:9967:17) at async TokenDocument5e.createDocuments (document.mjs:338:21) at async TokenDocument5e.create (document.mjs:439:21) foundry.js:3053 Foundry VTT | Rendering Tidy5eNPC foundry.js:2556 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'collection') [Detected 1 package: lootsheetnpc5e] at fromUuid (foundry.js:2556:40) at LootSeeder.seedItemsToActors (LootSeeder.js:29:27) at Object.onClick (LootsheetNPC5eHooks.js:159:43) at SceneControls._onClickTool (foundry.js:51831:52) at HTMLLIElement.dispatch (jquery.min.js:2:43064) at v.handle (jquery.min.js:2:41048)

DanielBoettner commented 2 years ago

Either in the settings or on an actor you have to set a rolltable. I will investigate how to prevent that and give proper feedback.