Right now, there are a few if statements in the changes I made to the one function, here is a representative one that we would want to change:
if not self._critTable[crit] then print("NIL VARIABLE: self._critTable[crit]") end
If you change it like this:
if not self._critTable[crit] then
print("NIL VARIABLE: self._critTable[crit]")
print("Crit: " .. crit)
end
Then it should display the value of the crit variable that has no corresponding value in the _critTable.