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

Difficulty nesting tables with script recursive tables

Hello everyone!   I play a Brazilian system from the 90s that uses tables. To complete an attack I need to check the affected area using a scrollable table named 1t [area] and cross it with the damage done. To make this work (keeping the dice 3d) I made a scrollable table for each possibility of the crossing with the name 1 [area-damage].   What I would like to do is replace the name area with the result of the scrollable area table and the damage with a query, I have done it this way: !rt [[1t[[[1t[area]]]-?{Damage|light|medium|heavy}]]] but it hasn't worked, could someone help?
1593103829
The Aaron
Roll20 Production Team
API Scripter
The problem is the initial roll is always expanded by the chat system, it's only table rows that RecursiveTable is able to expand.  To make this work, I'd suggest making 3 tables named something like Roll-Light, Roll-Medium, and Roll-Heavy.  Each will have a single row that looks like: [[1t[[[1t[area]]]-light]]] etc. Then your command will look like: !rt [[1t[?{Damage|light,Roll-Light|medium,Roll-Medium|heavy,Roll-Heavy}]]] That should let it work correctly.
fsdfsdfd I did the procedure but this is returning this error: ypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at Object.d20.getWeightedTable (/home/node/d20-api-server/api.js:143:73) at Object.d20.getTableElementCount (/home/node/d20-api-server/api.js:130:14) at validateParseResult (eval at <anonymous> (/home/node/d20-api-server/api.js:157:1), <anonymous>:288:32) at parseRollString (eval at <anonymous> (/home/node/d20-api-server/api.js:157:1), <anonymous>:370:22) at Object.process (eval at <anonymous> (/home/node/d20-api-server/api.js:157:1), <anonymous>:1025:17) at _processRoll (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:1042:30) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:982:10) at _findInlineRolls (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:997:11) at inlinefinalcallback (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:1108:7) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:994:11)
1593178990
The Aaron
Roll20 Production Team
API Scripter
hmm.. I'll have to try and duplicate this over the weekend. 
The problem seems to be in the formula [[1t[[[1t[area]]]-light]]] which is defined as an element in the table, even though I only launch directly into the chat: !rt [[1t[[[1t[area]]]-light]]] it does not executevany command.
1593181201
The Aaron
Roll20 Production Team
API Scripter
The chat should end up being something like: !rt [[1t[Roll-Light] ]] after the Roll Query expansion. Actually, if you want to PM me an invite to your game and GM me, it might be easiest for me to help you by working it out with your tables directly.