Quote Originally Posted by Trenloe View Post
If you always want bDice to be a d100 and a d10 then you can just statically set the table as you did in the first line of post #2: local bDice = {"d100", "d10"}; Then you can add any further dice to this as required using one table.insert for each die to be added.
Thank you very much again Yes, now everything works as expected

(The background is that I want to have phycial dice for fortification in 3.5e/Pathfinder, that is some percentage die you roll against incoming critical or precision damage to negate that when the outcome of the d100 is small enough. So depending on the incoming damage you need no d100 or 1d100 (when there is critical or precision) or 2d100 (when there is both, critical and precision damage die). Thus, I wrote a code to look at each damage die to see if fortification applies; if fortification applies then it should add a d100. Therefore bDice is normally empty at the beginning such that the situation with no d100 is also possible )