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

Macro not working as token action

New to Roll20 here, trying to put a macro in a token action.  Sorry if this is a FAQ, I've spent 20 minutes searching the forums and can't find an answer. The macro is fairly simple:  !token-mod {{ --set statusmarkers|=dead }} /em @{selected|token_name} is defeated It works fine when I press the "Test Macro" button, but when I make it a token action, it puts the !token-mod line in to the chat window and doesn't execute it. I know it's something I'm doing wrong that is probably pretty simple.  Thanks in advance.
That might be an API issue. Have you asked the API author?
I have not.  I will.  Good to know that it doesn't sound like I'm doing something wrong.
I don't know how to contact him except on here.  Guess I'll wait for more responses.   Author is "The Aaron"
If you go to the forum post where you found the script, you should be able to click on his name (or on one of the many thousands of forum topics he's given advice on). On his profile there's a button to send him a message.
1591483677
Kraynic
Pro
Sheet Author
What do the double curly brackets do in your Tokenmod command?  If you take those out of the first line, does that command work?
I saw an example somewhere here in the forums that I copied that from.  Removing the curly brackets seems to produce the same results. !token-mod --set statusmarkers|=dead /em @{selected|token_name} is defeated I have a PM in to Aaron to see what he has to say on it.
Found it.  There was a space before the first line.  With the space, "Test Macro" works, but token action doesn't.  Without the space, both work.  Thanks for the help!
@Tyler I'm having similar problems with macros in the character toolbar.  I've been trying to troubleshoot my macros all day long only to find out that the exact same macros will work fine in the player macro toolbar at the bottom but will only output #macroname if run from the character toolbar.  To make it worse, the macros that I tested were the ones given in the Nesting Macros section of the Roll20 wiki.  So now I have to convert all of my macros to use "selected|" when making reference to character abilities so they'll work in the player macro toolbar.  I'm hoping it's something I'm missing, but I think we're dealing with bugs in the character toolbar that the developers need to address.
@Chris, In my case, it was an extra space in the macro as the first character.  The "Test Macro" button strips off any spaces before it runs the macro, while the token actions don't do that.  The Aaron said he was going to talk to the Roll20 people about getting that changed so the test does the same thing everywhere else does. It doesn't sound like the same issue you are having though. :(   Sorry I'm not any help yet.  I'm still just getting started on Roll20.