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 .
×

Powercards, Firebase Error?

So I'm just starting to learn about this so I imagine I messed something up. I was trying to set up macros for my Pathfinder 2 game and I got this error after finally getting it to (mostly) run correctly. This is the error I get after using the macro once after the api was disabled. This only happened after I got the macro to "work" so im assuming its something with that? Below the error code I will put that code. Any help would be greatly appreciated. Error: Firebase.update failed: First argument contains NaN in property 'bar1_value' Error: Firebase.update failed: First argument contains NaN in property 'bar1_value' 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:877:27) at later (/home/node/d20-api-server/node_modules/underscore/underscore.js:888:31) at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:825:19) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) The Powercard: !power {{ --name|GreatAxe --leftsub|Melee Attack --rightsub|5 ft Range --Attack:|[[ [$Atk] 1d20 + @{level} + @{weapon_proficiencies_martial_rank} + @{strength_modifier} + ?{Attack Number?|First, 0 |Second, -5 |Third, -10} [Attack Penalty] ]] vs @{target|character_name}’s AC @{target|armor_class} --hroll|[[ [$Dmg] 1d12 + @{strength_modifier} ]] or [[ [$Crit] (1d12 + @{strength_modifier})*2 ]] or [[ [$CritAC] @{target|bar2}+10 + 0d0 ]] --?? $Atk >= $CritAC OR $Atk.base == 20 ?? Critical Hit| //Tiengo scores a critical hit for **[^Crit] slashing damage**!// --?? $Atk >= $CritAC OR $Atk.base == 20 ??alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Crit] _show|none --?? $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk >= @{target|bar2} AND $Atk < $CritAC ?? Hit|//Tiengo hits for **[^Dmg] slashing damage**!// --?? $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk >= @{target|bar2} AND $Atk < $CritAC ??alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|none --?? $Atk < @{target|bar2} AND $Atk.base <> 1 ?? Miss|//Tiengo **misses**.// }}
1601335943
Kurt J.
Pro
API Scripter
James R. said: So I'm just starting to learn about this so I imagine I messed something up. I was trying to set up macros for my Pathfinder 2 game and I got this error after finally getting it to (mostly) run correctly. This is the error I get after using the macro once after the api was disabled. This only happened after I got the macro to "work" so im assuming its something with that? Below the error code I will put that code. Any help would be greatly appreciated. Error: Firebase.update failed: First argument contains NaN in property 'bar1_value' Error: Firebase.update failed: First argument contains NaN in property 'bar1_value' 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:877:27) at later (/home/node/d20-api-server/node_modules/underscore/underscore.js:888:31) at Timeout._onTimeout (/home/node/d20-api-server/node_modules/underscore/underscore.js:825:19) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) The Powercard: !power {{ --name|GreatAxe --leftsub|Melee Attack --rightsub|5 ft Range --Attack:|[[ [$Atk] 1d20 + @{level} + @{weapon_proficiencies_martial_rank} + @{strength_modifier} + ?{Attack Number?|First, 0 |Second, -5 |Third, -10} [Attack Penalty] ]] vs @{target|character_name}’s AC @{target|armor_class} --hroll|[[ [$Dmg] 1d12 + @{strength_modifier} ]] or [[ [$Crit] (1d12 + @{strength_modifier})*2 ]] or [[ [$CritAC] @{target|bar2}+10 + 0d0 ]] --?? $Atk >= $CritAC OR $Atk.base == 20 ?? Critical Hit| //Tiengo scores a critical hit for **[^Crit] slashing damage**!// --?? $Atk >= $CritAC OR $Atk.base == 20 ??alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Crit] _show|none --?? $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk >= @{target|bar2} AND $Atk < $CritAC ?? Hit|//Tiengo hits for **[^Dmg] slashing damage**!// --?? $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk >= @{target|bar2} AND $Atk < $CritAC ??alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|none --?? $Atk < @{target|bar2} AND $Atk.base <> 1 ?? Miss|//Tiengo **misses**.// }} Likely not related to PowerCards exactly, but more to the Alter Bar calls (which need different numbers after them, by the way - alterbar*1, alterbar*2, etc.). Is the value of bar1 on the target token a number? From the error you posted, it looks like Alter Bar is trying to add/subtract to something that is not a number (that's what "NaN" means)