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

what am i doing wrong?

i have tried to nest this macro and make it whisper me , /w vega &{template:default} {{name=encounter}} {{[City](! #City-encounter)[Inn](! #bar-events)[crowd](! #city-workers)[Forest](! #wilderness-encounter)}} but i end up looking like this  , why do i get that visible line at the bottom ? (To Vega): encounter City Inn crowd Forest Vega (GM):
1587224598
Kraynic
Pro
Sheet Author
My guess would be the line breaks.  The name header is broken in your output also, so try it all in one line and see if that works.
1587225371

Edited 1587225381
GiGs
Pro
Sheet Author
API Scripter
I copied your macro and tried it out and it doesnt give the same output for me - the title bar is properly formed.  But you do have an issue: that syntax for the buttons is missing the codes that make command buttons work. It should look like this /w Gigs &{template:default} {{name=encounter}} {{[City](!
#City-encounter)[Inn](!
#bar-events)[crowd](!
#city-workers)[Forest](!
#wilderness-encounter)}} If you save this to a macro, it should work. BUT if you reopen the macro, all these characters:  
 will vanish and cause it to fail. 
why does it do this? BUT if you reopen the macro, all these characters:  
  will vanish and cause it to fail. 
1587267380
GiGs
Pro
Sheet Author
API Scripter
That stringn is what is known as a html entity. Certain characters can (or used to, but dont any more) cause problems when making webpages. If you use the < or > characters for instance, they can be confused with programming elements that control the shape of a webpage, so having an alternate way to represent them is handy. When the browser encounters such html characters, it 'interprets' them - that is, it reads them, and converts them into the character they represent. But, in simple terms, that happens after the page is built, so it doesnt break the way the page displays. Some people discovered imaginative ways to use them, as in this: {{[City](!
#City-encounter) This is a hack. the syntax {{[City](!something) was designed as a way to let uses launch API commands. If you do  {{[City](! something) the command doesnt work - but if using an api command, you would never do that. But someone realised if they used a html entity for a linebreak, like so  {{[City](!
#City-encounter) then roll20 would be tricked into thinking this was a single-line API command, and it would work. But whenever you open a macro with such a command, roll20 reads an interprets the text so it can display it to you. That process of reading the macro causes the html entity to be turned into the character it represents (a line break) which breaks the code and it doesnt work any more. I hope this is understandable. It's a hack of a technique used in web design to create a feature that roll20 technically doesnt support.  Which is why the syntax is weird, and why its flawed in the way things break if you look at them too much. For some reason, this process does not happen on Abilities stored on the Attributes and Abilities tab of a character sheet. You can store html entities there and they will be safe. This leads to many people creating a character called Macros (or similar) and using that to store macros like this one - so that they can be opened and edited safely.
It could also happen when there's another line after the code, for example  <code.... ...code> after executing the code it will also print the empty space in the last line because there's a new line there even if there's no text, just check that you don't have a new line at the end of the code, for me it fixed it
ok thanks guys , i understand a bit better now cool .