
Hello I am pretty new to scripting and needs some assistance. I adopted Stephan H's combat api from <a href="https://app.roll20.net/forum/post/540414/script-4e" rel="nofollow">https://app.roll20.net/forum/post/540414/script-4e</a>... and made some changes to better match my gameplay/style. I added monitoring of the target's HP and TempHP (which are bars 1 and 2) and adjusting them with incoming damage. I also added changing states for bloodied and dead. Everything works fine on when working through the script. But if i change the bar values from any other script or manually, it fails to modify the HP/TempHP and i get this error from the sandbox: For reference, the error message generated was: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function f(a){throw a;}var j=v ^ Error: Firebase.update failed: First argument contains NaN in property 'bar1_value' at Error (<anonymous>) at Aa (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Aa (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:196) at za (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:468) at Da (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:392) at G.W.update (/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:128:318) at TrackedObj._doSave ( If i refresh the sandbox and campaign page, it works fine without issue. Any ideas? Here is my script: <a href="https://gist.github.com/69e25860ebf2f3e0a129.git" rel="nofollow">https://gist.github.com/69e25860ebf2f3e0a129.git</a>