Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

CRP roll - not posting

1730741777

Edited 1730741910
vÍnce
Pro
Sheet Author
TITLE EDIT: [ CRP roll - not posting roll object to console ] Any reason why this basic CRP roll doesn't show a roll object in the console? Posts to chat just fine... What am I missing? lol  on('sheet:opened', (eventInfo) => {   console.log(`CRP ROLL`);     const roll_string = `&{template:default} {{[[ 3d20kl1 ]]}}`;     startRoll(roll_string, (roll) => {       console.log(roll);       finishRoll(roll.rollId);     });   });
1730745562

Edited 1730745632
vÍnce
Pro
Sheet Author
For anyone following; although it posts to chat fine without it, the roll needs a label to create the roll object (thank you Scott) ie const roll_string = `&{template:default} {{test=[[ 3d20kl1 ]]}}`;
1730832460
GiGs
Pro
Sheet Author
API Scripter
That's good to know, and makes sense. I don't usually try to run a roll without a key (what you are referring to as a label), so I'd have probably missed that initially too.
1730832652
vÍnce
Pro
Sheet Author
Thanks to your awesome site I'm having a great amount of fun delving into CRP.  Very cool indeed.  Cheers GiGs
1730852715
GiGs
Pro
Sheet Author
API Scripter
I'm very happy you are enjoying it and finding it useful!