Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Error: when clicking the "reload" button as part of the ammo tracking

1611204705

Edited 1611204841
Since I loaded CombatMaster 2, I have problems with amoo tracking reload button: When a character tries to reload, I get this message: Yakov "Jelly Donut" Kirolenko  gains NaN ammo and has NaN remaining. At this point, all API commands and scripts stop working and I get this error in the Sandbox. Error: Firebase.update failed: First argument contains NaN in property 'current' Error: Firebase.update failed: First argument contains NaN in property 'current' at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at J.update (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (/home/node/d20-api-server/api.js:878:27) at later (/home/node/d20-api-server/node_modules/underscore/underscore.js:1134:31) at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:1071:19) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) simply restarting the sandbox fixes everthing until the next time a character tries to use the reload button the ammo tracking script Im using is: {{buttons0=[Reload?](!ammo @{character_id} repeating_attack_@{id}_ammo [[@{@{character_name}|repeating_attack_@{id}_ammo|max}-@{@{character_name}|repeating_attack_@{id}_ammo}]] @{ammo_type})}} !wammo @{character_id} repeating_attack_@{id}_ammo [[[[-@{usage}]]*{[[@{full_attack_query}*@{full_attack_number}]]d1,[[1]]d1}kh1]] @{ammo_type}
Did that macro work before? I think you need to replace @{id} with the row ID of that specific repeating entry.
Persephone said: Did that macro work before? I think you need to replace @{id} with the row ID of that specific repeating entry. Yes, it used to work
Are you running starfinder? That ammo syntax looks similar is the reason I ask. Are you running that macro inside CM or from the the characters attacks on the sheet? The reason its failing is likely due to value of the attribute not having a number meaning its blank. Weather that due from running the macro from CM or running from the sheet depends on how its configured. We'd need more info on how you are executing it.