Not sure how it's working properly.
DataCommonADND.nDefaultTurnUndeadMaxHD is 14;
That will flip through array[Cleric Level][Rank] where Rank is 1 to 14. The only valid entry would be 1 with those arrays you had.Code:for i=1, nMaxTurnHD,1 do
local rTurn = {};
local nTurnValue = DataCommonADND.aTurnUndead[nClericLevel][i];
...