Oh my goodness we got it fixed! You may want to test yourself that everything still works, but essentially, you just add this: Replace the section that currently reads //If a card is specified by name
if (cardChoice !== '') {
let theCard = findObjs({
_type: 'card',
name: cardChoice,
_deckid: deckID
})[0];
if (theCard !== undefined) {
do {
let specificCardID = theCard.id;
giveCardToPlayer(specificCardID, ownerid);
numCards--;
}
while (numCards > 0);
return;
} else {
sendChat('deal', '/w gm There does not seem to be a card named ' + cardChoice + ' in the deck ' + deckChoice);
return;
}
} With this: //If a card is specified by name if (cardChoice !== '') { let theCard = findObjs({ _type: 'card', name: cardChoice, _deckid: deckID })[0]; if (theCard !== undefined) { do { let specificCardID = theCard.id; if (cardAction == 'give') { giveCardToPlayer(specificCardID, ownerid); numCards--; } else { takeCardFromPlayer(ownerid, {cardid: specificCardID}) numCards--; } } while (numCards > 0); return; } else { sendChat('deal', '/w gm There does not seem to be a card named ' + cardChoice + ' in the deck ' + deckChoice); return; } } Tested it and it works for me! Thanks Keith!