Working on NPC sheets now. Still having a similar problem as with CS. When I input the below script for a Number Field box, I get a nil error, even though I have entered a Default Value "0"
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nInjury = nodeWin.getChild("injury_level").getValue();
local nFatigue = nodeWin.getChild("fatigue_level").getValue();
local nUniversal = math.ceil(nInjury+nFatigue);
nodeWin.getChild("universal_penalty").setValue(nUn iversal);
end
You sent a line of script earlier, but I am not sure where to put it or if there is an easier solution.
local sMCInitBonus = DB.getValue(nodeChar,"initbonus",0)