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

Line Break or New Line with sendChat API

I am struggling to send messages to chat from the API containing line breaks or new lines.  I would like to make a selection of rolls to myself in private as the DM.  I have tried /n and \n and ^^ and a few other things with no success.  Below is the code I have for my secret rolls; sendChat ( "GM Secret Rolls " + rolltype, "/w gm " + char1rollresult + "test new line 1" ) Any pointers would be MUCH appreciated!
1448830305
The Aaron
Pro
API Scripter
You can use HTML to make breaks: sendChat( "GM Secret Rolls " + rolltype, "/w gm " + char1rollresult + "test new line 1 <br> test new line 2 <br> test new line 3" );
That works great! Thank you very much.  I have read many of your posts to help myself learn, I appreciate your contributions!
1448837340
Lithl
Pro
Sheet Author
API Scripter
<br> makes an Html line break in the output. \n creates a new line, which if you wanted to also be a whisper would need a second /w gm just like if you had pressed enter in writing a macro.