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 in API (torch maybe)

I get this error, any ideas what it may be?  I noticed after I tried to run my Utility macro for 5E Shaped and when it didn't do anything, I checked the API.  Not sure when it actually cracked out.  After restarting the sandbox, it runs my script but this happens frequently that the api crashes. Error: Firebase.update failed: First argument contains NaN in property 'light_dimradius' Error: Firebase.update failed: First argument contains NaN in property 'light_dimradius' 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:766:27) at Timeout.later [as _onTimeout] (/home/node/d20-api-server/node_modules/underscore/underscore.js:828:25) at ontimeout (timers.js:380:14) at tryOnTimeout (timers.js:244:5) at Timer.listOnTimeout (timers.js:214:5)
1513016936
The Aaron
Pro
API Scripter
This is a bug in TokenMod.&nbsp; It's fixed in the latest version, which isn't in the 1-click yet.&nbsp; It has to do with negative number handling.&nbsp; You can download the latest version from my repo ( <a href="https://github.com/shdwjk/Roll20API/blob/master/To" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/To</a>... ) or the 1-click will get updated probably tomorrow.
can I do a not related here? I wrote this into a Macro and when I use the macro and hit the HALF button, my token gets small.&nbsp; Perfect.&nbsp; But if instead I use the DOUBLE button my token gets REALLY REALLY small, almost invisible small.&nbsp; If I do DOUBLE first then Half, the half just makes it that much smaller.&nbsp; But DOUBLE will never make it bigger.&nbsp; The command by itself to DOUBLE works fine in the chat box, but not in my macro.&nbsp; Any idea why? [Double](!token-mod --set height|*2 width|*2) [Half](!token-mod --set height|/2 width|/2)
1513018145
The Aaron
Pro
API Scripter
hmmm... That is really bizarre. After running the Double macro, push up in chat and see what it sent to the API.&nbsp; Copy paste that here, I guess and I'll see if it does the same for me.
1513018229
The Aaron
Pro
API Scripter
OH.&nbsp; Actually, I bet I know what's happening.&nbsp; Try this instead: [Double](!token-mod --set height|&amp;ast;2 width|&amp;ast;2)
1513033543
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Curse you, Red Baron! HTML Replacements! Actually, that's good to know. I use this in my Scenes macro without issue: --set width|[[70*22]]
1513033915
The Aaron
Pro
API Scripter
It's probably the [foo]( ) syntax in particular.&nbsp; The * * gets treated as Italic for the basic formatting text stuff.&nbsp; It really shouldn't do it inside the (), but it's probably a pretty simple implementation that looks for /\*.*\*/ and replaces it with &lt;i&gt;.*&lt;/i&gt;.&nbsp; I ran into this issue when rewriting the help on TokenMod.&nbsp; Probably if you only had one * or used /0.5 instead, it wouldn't be an issue.&nbsp; I think I'll add x as an alternative to * for that reason.