spacemandev-git / fvtt-card-support

Adds programmatic deck support to FoundryVTT
MIT License
10 stars 10 forks source link

Discard entire hand returns "Uncaught Error: TypeError: game.decks.getByCard(...).discardCard is not a function" #81

Open Cynicaltaxiderm opened 3 years ago

Cynicaltaxiderm commented 3 years ago

Module v. 1.6.1 foundry 0.8.6 DnD5e 1.3.3

Console output for Firefox is below. It's happened to several players, both locally and remotely connected, using various browsers. It seems to be happening randomly to one or more players, but never all players. Please note that my url is replaced with "< FOUNDRY URL >" below

submit http://<FOUNDRY URL>/scripts/foundry.js:20355
_onClickButton http://<FOUNDRY URL>/scripts/foundry.js:20314
jQuery 2
    dispatch
    handle

foundry.js:20355:13

I hope that's helpful.

DEBUGjqerey.min.js.txt

Norc commented 3 years ago

This can happen rarely as a result of... something getting out of synch.

if you reset all decks involved first, and then have all players discard their entire hands, this should resolve the issue moving forward, and hopefully it happens rarely enough to not recur.

Good luck, and sorry about the delay... I forget to check Spaceman's repo. I need to set up notifications.

Norc commented 3 years ago

Additionally, this may happen if you have more than one GM in the world. Unfortunately, more than one GM interacting directly with decks is not supported currently.

Cynicaltaxiderm commented 3 years ago

Additionally, this may happen if you have more than one GM in the world. Unfortunately, more than one GM interacting directly with decks is not supported currently.

That would be it. I had set up a card based, DM-less 5e game, and set everyone as a DM so they could interact with the deck, and it was pretty consistent on only letting one DM interact with it; I didn't put 2+2 together.

Just in case, for my own reference, was that kind of thing documented somewhere? Troubleshooting Discords have got me in the habit of trying to read documentation for things before I ask for help, and I wanted to make sure I didn't miss it somewhere.

Thanks for the reply.

Norc commented 3 years ago

The documentation has not kept up with this one sadly. I'm sure there's an issue here somewhere, but nothing that anybody could reasonably be expected to find.

For this setup, I'd recommend one GM, and then have everyone else as a player. Use the Interact with Decks button (the card shaped icon pictured here at the bottom) for the regular players to interact with decks:

[image: image.png]

On Wed, Jun 23, 2021 at 7:45 PM Cynicaltaxiderm @.***> wrote:

Additionally, this may happen if you have more than one GM in the world. Unfortunately, more than one GM interacting directly with decks is not supported currently.

That would be it. I had set up a card based, DM-less 5e game, and set everyone as a DM so they could interact with the deck, and it was pretty consistent on only letting one DM interact with it; I didn't put 2+2 together.

Just in case, for my own reference, was that kind of thing documented somewhere? Troubleshooting Discords have got me in the habit of trying to read documentation for things before I ask for help, and I wanted to make sure I didn't miss it somewhere.

Thanks for the reply.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spacemandev-git/fvtt-card-support/issues/81#issuecomment-867228320, or unsubscribe https://github.com/notifications/unsubscribe-auth/APNL7OZPYJJMZ3LPI2SNFM3TUJWZZANCNFSM464WLYZQ .