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 .
×

Macro Issue w/targeting

The macro in question is this: /w @{target|token_name} ?{"What"|um} @{selected|token_name} *whispers* to @{target|token_name} I have looked at other posts, they're all on the token layer and we all use chrome. I cannot connect to the roll20 wiki - it's saying 504 bad gateway.      > I have cleared my cache. It gives me a giant repeating list of errors saying:  "You attempted to use a roll command looking for the value of a selected token, but no tokens are selected. I select another player's token. I've read forums saying this particular command (I copied and pasted and only changed to whisper, I don't think that would be an issue?) and it's giving me heck! I am not tech savvy so this is becoming particularly frustrating. lol
1592482486
David M.
Pro
API Scripter
Sounds like an order of operations issue. You need to have the "selected" token selected before running the macro, while the "target" token is clicked after the macro is initiated. 
1592485821
GiGs
Pro
Sheet Author
API Scripter
Yes, as David suggests, try swapping the order: @{selected|token_name} *whispers* to @{target|token_name} /w @{target|token_name} ?{What|um} You also dont need quotes around "What" in the query.
This is what I get when I switch it as said: 
Rip the picture didn't post...
1592504350

Edited 1592504373
Okay, I figured that part out, the token wasn't assigned to anything. Not tech savvy (check) lol but when I send messages it is doing something odd: It's adding the second name into the whisper. :3
1592505108
Ziechael
Forum Champion
Sheet Author
API Scripter
Surround your name call in "": @{selected|token_name} *whispers* to @{target|token_name} /w " @{target|token_name} " ?{What|um}
1592506153

Edited 1592506222
David M.
Pro
API Scripter
Sounds like you might need to assign the token to a player or character sheet? EDIT: crossed-posted
1592522141

Edited 1592522577
Ziechael said: Surround your name call in "": @{selected|token_name} *whispers* to @{target|token_name} /w " @{target|token_name} " ?{What|um} Which one is the name call? Sorry :/ Edit: Put quotes around everything, it worked. lol Thank you everyone!
1592557003
GiGs
Pro
Sheet Author
API Scripter
Ziechael's example had the quotes where you need them. You just need to put the quotes after the /w, where the name goes:  /w "@{target|token_name}" ?{What|um}