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

@{target|token_name} not always providing value

I have noticed that getting the "target" token_name doesn't always work. I find that it seems to nearly always return the token name for an NPC token, whereas it nearly always will NOT return the token name for a Player token. I'm investigating more right now, and I will look into other values as well, but I was just getting this out there.
UPDATE: I changed the macro to this: @{target|token_name}: @(target|bar1}, @(target|bar2}, @(target|bar3} It provided the name 5 times out of 10 clicks for one of the the PCs, but not every other time. For the other PCs, it never provided the name. It provided the name 100% of the time for the NPC tokens. It never provided the bar values, instead simply echoing the "@{target|bar1}..." right back each time.
You have a typo in your script, where you are using a parentheses instead of a bracket for "@(target|bar1}" try @{target|bar1} and it should work fine. My guess it hat you aren't getting a token_name back for some tokens that are linked to characters?
Occasionally, yes. As I said, some player tokens are roughly 50% return rate, others are 0%. All non-player tokens return 100%.
I fixed the typo, thank you! So now I get either all 4 values, or none of them. Still with the same consistency. Some Player tokens never return, other Player tokens sometimes return, all non-Player tokens always return.
1385356757

Edited 1385357089
Actually I'm having a problem with this as well. @{selected|token_name} rolls for initiative! and gets a [[1d20 +@{selected|Initiative} &{tracker}]]! Works for all my players except one. He has the variable correctly on his character sheet, I double checked. Edit: I figured it out, he had a space after initiative.
1385357031
Gauss
Forum Champion
Lifer4700 and Jarret, please send me a join link and I will come take a look.
Problem has been solved, thanks anyway Gauss.
1385358273
Gauss
Forum Champion
Ok :)
1385360469

Edited 1385360488
Link sent. By the way, Jarret. What was your solution?
there was a space after the attribute, I deleted the space.
1385527739

Edited 1385528361
Gauss
Forum Champion
What Lifer and I have determined, 4 particular Character sheets (and associated tokens) were bugged in some way. Duplicating them fixed the problem.