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

Problem with API mods not working

Dear all, I have just started a new game of Pit of the Dust Goblins and I have installed the following mods:    GroupInitiative , g roupChec k,  PathToWindowOrDoor ,  TokenMod ,  Token Action Maker  and  applyDamage . When I launch the game and try to test group initiative it does not work and I am getting the following error message  when I go into the API screen: " Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.   More info...   If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was:  SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at handleInput (apiscript.js:1945:22) at /home/node/d20-api-server/pubsub.js:63:16 at Object.publish (/home/node/d20-api-server/pubsub.js:68:8) at Timeout.processChatQueue [as _onTimeout] (/home/node/d20-api-server/api.js:2127:12) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7)" Can anyone help me as to what is causing this and how I can fix it? Many thanks in advance, Warwick  
1749397215
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Warwick! My first guess would be PathToWindowOrDoor. It uses JSON.parse, and could certainly fail if used in a Jumpgate game. Paths were completely reconfigured in Jumpgate and older scripts that reference paths have a high likelihood of running into problems. Your options are to petition the author for an update, abandon the script, or fix it on your own if you are JavaScript savvy. If you are not on a Jumpgate game, then I am not sure what the issue might be. Several of those scripts require configuration to function with whatever sheet you've chosen, so I'd check to make sure those steps were taken. Which sheet are you using?
Hi Keith, Many thanks for taking the time to reply.  I'm using the 5E D&D 2014 sheet (I assume that's what you're referring to). I deleted the game and re-loaded it and it hasnt crashed again yet, so it is an odd one.  I reloaded  PathToWindowOrDoor  too, and it seems to be working ok - so far.   I will send the info to the author of PathToWindowOrDoor and see if he wants to respond.  I can't write JavaScript, unfortunately, so I am reliant on the kindness of others, like your good self. Thanks a lot for your help. Warwick
Hi Keith, The API scripts crashed again so I deleted the game and created a new one with just groupinit and groupcheck installed.  The API's stopped working again and showed the following dialogue: "%cRoll20 Kingmaker Module log| kScaffold Loaded" "ERROR: getComputed() is only available for character sheets using Beacon SDK." "ERROR: getComputed() is only available for character sheets using Beacon SDK." "ERROR: getComputed() is only available for character sheets using Beacon SDK." "ERROR: getComputed() is only available for character sheets using Beacon SDK." "ERROR: getComputed() is only available for character sheets using Beacon SDK." "ERROR: getComputed() is only available for character sheets using Beacon SDK." "SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input     at JSON.parse (<anonymous>)     at handleInput (apiscript.js:3321:22)     at file:///home/node/d20-api-server/src/pubsub2.js:42:46     at Map.forEach (<anonymous>)     at PubSub.publish (file:///home/node/d20-api-server/src/pubsub2.js:42:35)     at Timeout.processChatQueue [as _onTimeout] (file:///home/node/d20-api-server/api.js:1350:14)     at listOnTimeout (node:internal/timers:569:17)     at process.processTimers (node:internal/timers:512:7)" SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input     at JSON.parse (<anonymous>)     at handleInput (apiscript.js:3321:22)     at file:///home/node/d20-api-server/src/pubsub2.js:42:46     at Map.forEach (<anonymous>)     at PubSub.publish (file:///home/node/d20-api-server/src/pubsub2.js:42:35)     at Timeout.processChatQueue [as _onTimeout] (file:///home/node/d20-api-server/api.js:1350:14)     at listOnTimeout (node:internal/timers:569:17)     at process.processTimers (node:internal/timers:512:7) "-=> GroupCheck v1.15 <=-" "-=> GroupInitiative v0.9.41 <=-  [Tue Jan 21 2025 18:05:48 GMT+0000 (Coordinated Universal Time)]" "##########> Sandbox [EXPERIMENTAL 2025-04-09] : Ready fired after 6.29s, 60 objects." "%cRoll20 Kingmaker Module log| kScaffold Loaded" I'm confused as to why the API's crashed again when I only had these two mods installed.   I thought I would share in case the fault is obvious but don't worry if it's not. I was running the "experimental" sandbox, in case that makes a difference? Many thanks Warwick  
1749413845
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I was primarily asking about Jumpgate, though the sheet also matters. I am not sure if the two scripts in question are dependent on Jumpgate, though the fact that it is asking for get.computed() seems to indicate that the config may not have been run. When you installed, did you run the config dialog to choose your sheet (the 2014 in this case)? Both Group Check and Group Init ask config questions upon installation To find out if your game is on Jumpgate, go to the home screen. You should see a Jumpgate tage:
Hi Keith, Yes, the game is on jumpgate.  Im not sure that I did run the configurators for Group Check and Group Init when I first ran the game.  But I did when I re-installed it and it seems to be working fine now, so I think that must have been the issue. Thanks again for your help. Warwick
1749517172
Andrew R.
Pro
Sheet Author
You should make sure that your Mods are using the Experimental engine in Jumpgate games so they can work with your Beacon Character Sheet.
1749527280
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Andrew R. said: You should make sure that your Mods are using the Experimental engine in Jumpgate games so they can work with your Beacon Character Sheet. Good point, Andrew. Warwick, you can set this on your mods page. There is a dropdown that allows you to choose which engine to use. The drop-down appears when you load the page, or when you click the Mod Library link on that page (the button before all of your script names in sequential order). It may take several tries for your choice to stick. This is a known issue, and one of the reasons it is still "Experimental".
Thanks to you both, I have done this and, for the moment, the problem hasnt reoccured.