
Looks like this is crashing for me - I have had it crash on 2 separate occasions so far.
I am using a macro to roll treasure:
!rt[Delimiter:BR|EmptyDefault:Nothing] /w gm &{template:default}{{name=CR 5-10 Hoard}}{{coins=[[2d6*100]] Copper Pieces | [[2d6*1000]] Silver Pieces | [[6d6*100]] Gold Pieces | [[3d6*10]] Platinum Pieces}}{{treasure=[[1t[TREASURE-HOARD:-CR-5-10]]]}}
Which returns:
And is correctly rolling on the tables.
The following Macro:
!rt[Delimiter:BR|EmptyDefault:Nothing] /w gm &{template:default}{{name=CR 10-16 Hoard}}{{coins=[[4d6*1000]] Gold Pieces | [[5d6*100]] Platinum Pieces}}{{treasure=[[1t[TREASURE-HOARD:-CR-11-16]]]}}
Is causing the script to crash with the following output:
For reference, the error message generated was:TypeError: 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:72) 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>:1036:30) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:976:10) at _findInlineRolls (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:991:11) at inlinefinalcallback (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:1102:7) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:988:11)
TypeError: Cannot read property 'id' of undefined
at Object.d20.getWeightedTable (/home/node/d20-api-server/api.js:143:72)
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>:1036:30)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:976:10)
at _findInlineRolls (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:991:11)
at inlinefinalcallback (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:1102:7)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:988:11)
I can't see anything wrong with my tables that would be causing it.
As it works, but every now and then just crashes.
Which makes me think it IS something wrong with my table. (works when calling X and Y but not Z, if that makes sense?)
The table in question is this:
The actual table contents is a little different to how it looks in the image
For example, the first row reads:
The following art worth 250 GP each:<br>[[ [[2d4]]t[250 GP ART OBJECTS] ]]<br><br>And the following loot:<br>[[ [[1d4]]t[MAGIC-ITEM-TABLE-A] ]]<br>[[ [[1d6]]t[MAGIC-ITEM-TABLE-B] ]]
But the HTML elements don't show within the table when just viewing it.
The same thing happens with my TREASURE-HOARD:-CR-17+ table:
!rt[Delimiter:BR|EmptyDefault:Nothing] /w gm &{template:default}{{name=CR 17+ Hoard}}{{coins=[[12d6*1000]] Gold Pieces | [[8d6*1000]] Platinum Pieces}}{{treasure=[[1t[TREASURE-HOARD:-CR-17+]]]}}
As I said, I am fairly sure it's not the macro causing it.
Maybe something about my table entries that it doesn't like?