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

Help With Enabling API Scripts

So! I'm fairly new to the API and I've not dabbled in Java since High School. I've been trying to use FinalFrog's MapTeleporters script and for the life of me I can't get it to actually load into the API sandbox, I can't get any manually entered script to do so for that matter. All I want are my fancy doors.
1536111659
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Could you describe your steps, methodically? It might help to find out where the problem is coming from.
1536111806

Edited 1536111952
I followed the github link, copied the script to clipboard, went to my API setting for a test game, clicked "New Script", named it MapTeleporter.js, pasted the script into the dialog box, saved, and reset the API sandbox. No results to my dismay.
1536112000
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Few more questions: 1. When going to the github, did you press the button to go to the Raw source before copying? Sometimes when copying from the main window, you can pick up extra characters. 2. Is the campaign currently launched? If the campaign is not open, the API sandbox will not load. 3. Assuming both the above are true, what message is being returned in the sandbox window?
I took the raw just in case as per your suggestion, sadly no results. The campaign has been up as I've been testing to see if it launched. As for what I get in the sandbox window. Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "Starting webworker script..." "Loading 483 translation strings to worker..." "%cSheet-log: %cPathfinder Playtest Character Sheet v0.01, build Date:1536066000 loaded"
1536112819

Edited 1536112831
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That sounds correct and are the results I get when I install it on a test campaign. What were you expecting to happen that is not happening?
I was expecting a line to appear in the sandbox to confirm the script had loaded. I tried setting up a test set of tokens to no avail.
1536114005
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The best thing to do in this case is to open a new thread in the API forum and ask for assistance from FinalFrog. Since I get the same results you do, it is not likely a problem with the Sandbox but with the script. You could also try sending FinalFrog a PM.
I thought it might be more of a general error on my part as I've had the same issue with all other scripts I've tried to install manually.
1536119025
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Do scripts installed with one-click work? What browser are you using? Is the problem just with the Sandbox report, or does nothing actually work within the campaign?
One-click scripts work just fine. Sandbox report tells me nothing and nothing I've tried using with various scripts works at all which is why I thought I might have been doing the install wrong.
1536147983
Jakob
Sheet Author
API Scripter
MapTeleporters does not seem to contain code to send a welcome message, so you should expect to see nothing at all on startup.
A sandbox line to say it's loaded is a welcome message?
1536157052
Jakob
Sheet Author
API Scripter
Tome said: A sandbox line to say it's loaded is a welcome message? Yeah, something like this "%cSheet-log: %cPathfinder Playtest Character Sheet v0.01, build Date:1536066000 loaded" in your example is what I mean by a welcome message. Script authors may  add it to their script, but it's not required at all. 
Ah, well then. So I may have been installing it properly this entire time and just misusing the script?
1536165656
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Entirely possible. That's why I suggested reaching out to the script writer. Also note that some scripts only work under specific circumstances. PageFX for instance only works when you are on the page that has the player ribbon. I would also suggest going to the script's thread and carefully reading the introduction. There may be caveats or introductory info or examples.