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

Initiative macro not working.

Ok, I have this as a token action for my players: /me rolls a [[1d6 + ?{modifier|0}[MOD] &{tracker}]] for initiative! Then I use this as a GM macro to determine initiative for NPCs/monsters: /emas @{target|token_name} rolls a [[1d6+?{modifier|0}[MOD] &{tracker}]] for initiative! Now, the player's macro is working fine, but the GM macro making the roll, but is returning the following error message: You wanted to send the result of this roll to the turn tracker, but no valid token was selected And no result is sent to the tracker. Any ideas why this is happening?
1425455844
Pat S.
Forum Champion
Sheet Author
You have that gm macro assigned to a token? The player macro is not using the @{target|token_name} so it will work without selecting a token but the gm one requires it. Try editing it to @{selected|token_name} and give it a shot. <a href="https://wiki.roll20.net/Macros#Using_a_Selected_To" rel="nofollow">https://wiki.roll20.net/Macros#Using_a_Selected_To</a>... <a href="https://wiki.roll20.net/Macros#Using_a_Targeted_To" rel="nofollow">https://wiki.roll20.net/Macros#Using_a_Targeted_To</a>...
1425455862

Edited 1425456050
vÍnce
Pro
Sheet Author
Hi Gozer. If you remove the /emas it works. I'm guessing the @{tracker} doesn't work in the emote. Haven't tested it. EDIT: Pat is correct if you want to use tracker with /emas. and @{target} works if you don't use the emote.
1425456297
Gen Kitty
Forum Champion
Just as the error message said, you need to have a token selected and THEN use the macro to add that token to the order tracker. Try using @{selected|token_name} instead of @{target|token_name} for your macro.
I was using the GM macro not as a token action, but as a campaign macro. I can always select the token first, and that's what I'll do. But I don't always select the token before hitting the macro, so I was trying to change my workflow a bit.
By the way, thanks for the replies!
1425469942
Gen Kitty
Forum Champion
Alas, you must select the token first, or a macro adding it to the turn order just won't work.