The variables are all defined properly. The math shows up in the API log correctly, but it's not setting the hit points on the bar when I use the obj.set function. // Adjust current hit points if the token has temporary hit points and its // previous hit points are greater than its current hit points. if (iTempHPAmt > 0) { if (iPreviousHP > iCurrentHP) { var iHPChange = iPreviousHP - iCurrentHP; if (iHPChange >= iTempHPAmt) { // Add temphp to currenthp, remove all temp hp. var iHPAdjustment = iCurrentHP + iTempHPAmt; log("I have " + iTempHPAmt + " temp hp."); log(iPreviousHP + " - " + iHPChange + " = " + iCurrentHP); log("Adjustment: " + iHPAdjustment); obj.set("bar" + barHP + "value", iHPAdjustment); } else { // Add temphp-hpchange to currenthp and set temphp as temphp-hpchange } } } API Log "I have 5 temp hp." "36 - 10 = 26" "Adjustment: 31"