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

Formatting Rollable Table Output

Howdy, folks, I've created a &nbsp;a simple "random hit location" rollable table, and use an equally simple macro to roll on it from the macro bar: /me rolls a random Hit Location [[1t[hit-loc]]] This all works well enough, but my problem is the output is ugly and I can't figure out how to make any changes to it: <a href="https://i.imgur.com/1XrIP6Y.jpg" rel="nofollow">https://i.imgur.com/1XrIP6Y.jpg</a> Even just being able to Bold the Hit Location and put a line break there so it's not all just a jumble would help. Is there a way to format this output to be clearer and more pleasing to the eye?
1496884764
The Aaron
Pro
API Scripter
Not without the API. &nbsp;Might I recommend my RecursiveTable script? &nbsp; <a href="https://app.roll20.net/forum/post/4954818/script-u" rel="nofollow">https://app.roll20.net/forum/post/4954818/script-u</a>... With it, you can embed basic formatting, or Roll Template codes. And even embed other rolls!
Thanks, The Aaron, I'll take a look!
1496892794
The Aaron
Pro
API Scripter
No problem! &nbsp;Let me know if you need any help!
Hiya, TheAaron... sorry, I know it's been like three weeks but I just was able to start tinkering with this and am getting an error. I copied the script from&nbsp; Github into a new API Script on my game settings and named it "recursive-table.js". In that game, I have a Rollable Table named "hit-loc," so I made a macro named TEST: !rt &{template:default}{{location=[[1t[hit-loc]]]}} When I run the macro, it outputs one time and then errors out the API Sandbox with the following error: TypeError: Cannot read property 'results' of undefined TypeError: Cannot read property 'results' of undefined at apiscript.js:74:49 at checkFinishedOps (eval at (/home/node/d20-api-server/api.js:150:1), :751:7) at eval (eval at (/home/node/d20-api-server/api.js:150:1), :831:8) at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:768:19) at ontimeout (timers.js:380:14) at tryOnTimeout (timers.js:244:5) at Timer.listOnTimeout (timers.js:214:5) Is this a script error, or am I using the commands incorrectly? Thanks!&nbsp;
1498936642
Silvyre
Forum Champion
Try adding a space before the end of the inline roll: !rt &{template:default}{{location=[[1t[hit-loc] ]]}}
1499018217
The Aaron
Pro
API Scripter
I think it probably has to do with the data in the rows of the table. &nbsp;Can you give an export of them or at least a screenshot?
To narrow it down and make it super simple, I made a new table (named "test-loc") with only three entries. Still generates the same error on first use, I need to re-spin up the API Table to get it to work again (adding a space to the inline roll also didn't work).