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

Whisper to random player

I'm attempting to set up a system by which I can whisper a random player some random text. The text comes from a rollable table, and I'm able to whisper to a selected character with `/w @{selected|character_name} [[1t[Whisper-Text]]]` To whisper to a random player, I have set up a second table with the character names, hoping to do this: `/w [[1t[PCs]]] [[1t[Whisper-Text]]]`, but I get an error message stating that it couldn't find a player named $[[0]]. Can anyone tell me why the whisper text displays the text, but the PCs roll returns 0?
As no one has responded i will share my lack of knowledge. `/w [[1t[PCs]]] [[1t[Whisper-Text]]]  doesn't indicate who to whisper to it just provides the result of the table rolls. So you are getting the error not from the tables but from not having a player named. This may work but is probably wrong. You should get the idea though `/w @{[[1t[PCs]]]} [[1t[Whisper-Text]]]'
1620305781
The Aaron
Roll20 Production Team
API Scripter
Mel is pretty much right.  The $[[0]] is the place holder for dice results.  It gets formatted during display with the dice roll data which accompanies the message.  The point at which it decides who to send the message to is before the substitution of the result occurs.  Even if it were after though, it would probably fail since the actual text would be formatted, so you'd see something like: /w <span class="dieresult tableroll">Robin</span> ... The only way to send messages randomly to users that I can think of is to use the API, a Pro Subscriber Perk.