Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ammunition #377

Open
jacobgrieninger opened this issue May 1, 2022 · 7 comments
Open

Issue with ammunition #377

jacobgrieninger opened this issue May 1, 2022 · 7 comments

Comments

@jacobgrieninger
Copy link

When I add ammunition consumption to an item and then try to roll, nothing will occur. If I remove the ammunition consumption it will roll, or if I disable better rolls and have the item consume ammo, it will roll and consume. Any suggestions?

@Zakkon
Copy link

Zakkon commented May 1, 2022

Hi! I encountered this bug aswell. Luckily, it's an easy fix.
I made a pull request here: #378

But you can also find the entire scripts/custom-roll.js file here (bugfix included) if you don't want to wait for the next BetterRolls release:
https://gitlab.com/-/snippets/2309757

@jacobgrieninger
Copy link
Author

Thanks! Dragged and dropped this in and everything works. Guess we'll wait for an update

@erlendaakre
Copy link

@jacobgrieninger Are you able to reopen this for visibility for the devs, even though there is a workaround?

@jacobgrieninger
Copy link
Author

Sure. Good idea

@cs96and
Copy link
Contributor

cs96and commented May 15, 2022

I've submitted a pull request that fixes this issue and #380. I think my pull request is slightly "more correct" than @Zakkon 's #378 as it calls correctly calls updateEmbeddedDocuments

@123mind123
Copy link

This problem is still going.
Thanks for the fix cs96and. It works perfectly with it.

@shecrio
Copy link

shecrio commented Jun 30, 2022

here's the console error for this

helpers.mjs:428 Uncaught (in promise) Error: The provided data is not an object!
[Detected 1 package: betterrolls5e]
at isObjectEmpty (helpers.mjs:428)
at CustomItemRoll.roll (custom-roll.js:705)
at async CustomItemRoll.toMessage (custom-roll.js:824)
isObjectEmpty @ helpers.mjs:428
roll @ custom-roll.js:705
Promise.then (async)
🎁call_wrapper @ libWrapper-wrapper.js:630
🎁CONFIG.Item.documentClass.prototype.roll#0 @ libWrapper-wrapper.js:189
_onItemRoll @ base.js:931
(anonymous) @ base.js:612
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants