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

@{variable|max} not working

As far as I can tell, it just doesn't work.
1380151712
Pat S.
Forum Champion
Sheet Author
What was the macro or roll you were using? Sometimes it is just a typo or something you missed.
1380157675

Edited 1380157748
/me takes a breath and glares. Second Wind grants him [[ceil(@{HP|max} *0.5)]] hit points. or /me takes a breath and glares. Second Wind grants him [[ceil(@{HP|max} /2)]] hit points. Same thing.
1380160175

Edited 1380160187
Pat S.
Forum Champion
Sheet Author
If I remember the example Riley gave and others talked about, you formula should be [[ceil (@ {HP|max} *0.5)]] or [[ceil(@ {HP|max} *0.5)]] I could and probably am wrong but the spacing between specific things have to be correct or it won't work. You are sure that all the named items are spell exactly the same? Sometimes people title something hp then macro it HP.
Try @{CharacterName|HP|max} instead. Replacing character name with the name on the character sheet in Roll20.
1380196137

Edited 1380196309
Even within the character sheet? Edit: Ok. That did work.
This was a bug, it should be fixed now.
Yes! I reported a bug! And it was an actual bug and not user error!
Riley D. said: This was a bug, it should be fixed now. What will happen if someone has a character name with the same name as an attribute?
1380204887

Edited 1380204960
Riley D.
Roll20 Team
HoneyBadger said: Riley D. said: This was a bug, it should be fixed now. What will happen if someone has a character name with the same name as an attribute? If I understand your question properly, this only applies to variables that are used in Character abilities. In abilities if you just put for example @{Dex} it's smart enough to add-in the @{Riley|Dex} part silently for you. What was happening was it was assuming that @{Dex|max} meant "character named Dex, attribute named max". I just put in a little code for the special case of "max", treat it as @{Riley|Dex|max} in Riley's character abilities. So really this would only be an issue if you had a Character named the same as an ability *and* you had an attribute named "max" *and* you were trying to access that attribute from another character's abilities. And honestly I don't think it's very common to call other Character's attributes from inside another Character's abilities, anyway, since there was a bug that caused it to be somewhat broken until yesterday and no one noticed until we introduced the @{selected} variables. If that's not what you meant, let me know.
Nope, that covers it all.