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

November 23 (11 years ago)
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.
November 23 (11 years ago)
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.

November 24 (11 years ago)
Riley D.
Roll20 Team
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?
November 24 (11 years ago)
Occasionally, yes.

As I said, some player tokens are roughly 50% return rate, others are 0%. All non-player tokens return 100%.
November 24 (11 years ago)
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.
November 25 (11 years ago)

Edited November 25 (11 years ago)
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.
November 25 (11 years ago)
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.
November 25 (11 years ago)
Gauss
Forum Champion
Ok :)
November 25 (11 years ago)

Edited November 25 (11 years ago)
Link sent.

By the way, Jarret. What was your solution?
there was a space after the attribute, I deleted the space.
November 27 (11 years ago)

Edited November 27 (11 years ago)
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.