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

I'm lost and confused..

1426339856

Edited 1426340140
So I used to play a lot of MUDDS back in the day and so not that unfamiliar with coding. But right now I'm lost as to how even import a script or make it work. I've tried looking around to see if maybe I was doing something wrong but right now I'm just trying to use the initative tracker. It says it would work automatically when I organized turns. and I had copied and pasted the script into the API box and it said reloading sandbox and didn't give me any errors but when I go to my game and do !tracker help it doesn't do anything which leads me to believe it's not working right. Is there a setting I missed or am I not importing things right. I'm wanting to get further into using these but right now I can't get even a imported script to work. So maybe there is something I'm missing or could someone explain how to simply import scripts that would be amazing. This is one error I get that says that the script is 'disabled" Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: Unexpected token : I did a direct copy and paste so aye I'm not sure what I'm even doing wrong here.
same here. I keep trying to make a character and can't pull up the sheet. asked around and got no response.
1426351956
Lithl
Pro
Sheet Author
API Scripter
Kelly, you seem to have a very different problem from John, and you would probably do much better to make a thread in the Specific Use forum. John, could you post the script that is crashing on you? I have my suspicions about what's wrong, but I can't be certain without looking at the problem.
@Brian this is the one I copied and pasted over into the script and hit save script that gave the error and I'm not even sure what I did wrong <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... For some reason I can't copy and paste the script into this box but it's there that I'm trying to use.
1426359595

Edited 1426440482
The Aaron
Pro
API Scripter
EDIT : Is that your only api script?
No that's not mine at all. was a script I was led too when I was looking for scripts to help out. I was wanting some i could just plug in so I can get the idea of how the coding works and reverse engineer it as that's how I often do the learning. and everytime I plugged that in it wasn't working at all so I'm not sure if I'm doing something wrong or maybe it is the script. Does anyone have a link to working scripts I could maybe try. Because I want to keep the mentor status but it seems that's only really useful if you can get scripts to working.
1426438415
Gen Kitty
Forum Champion
Here's some working scripts you should look at, and seriously consider using in your games: <a href="https://app.roll20.net/forum/post/1257490/script-t" rel="nofollow">https://app.roll20.net/forum/post/1257490/script-t</a>... <a href="https://app.roll20.net/forum/post/1066916/script-g" rel="nofollow">https://app.roll20.net/forum/post/1066916/script-g</a>... <a href="https://app.roll20.net/forum/post/1463736/script-p" rel="nofollow">https://app.roll20.net/forum/post/1463736/script-p</a>... <a href="https://app.roll20.net/forum/post/1273423/script-t" rel="nofollow">https://app.roll20.net/forum/post/1273423/script-t</a>...
1426440821
The Aaron
Pro
API Scripter
John K. said: No that's not mine at all. was a script I was led too when I was looking for scripts to help out. I was wanting some i could just plug in so I can get the idea of how the coding works and reverse engineer it as that's how I often do the learning. and everytime I plugged that in it wasn't working at all so I'm not sure if I'm doing something wrong or maybe it is the script. Does anyone have a link to working scripts I could maybe try. Because I want to keep the mentor status but it seems that's only really useful if you can get scripts to working. Sorry, my question was mistyped. I meant is that your only script. I'd try adding an empty line to the bottom of the script and possibly a ; Javascript has automatic semicolon insertion, which is a horrible thing that leads to many many errors. Looking at the source of that script, I notice that it has no semicolon or blank line at the end. When you save your API scripts, they get concatenated together into a single script file that is executed for your campaign. If there isn't a semicolon on the last statement and there isn't a blank line after it, it will get joined together into something unintentional, which won't be valid javascript. However, you won't see it because it's an artifact of the concatenation process.
1426447511

Edited 1426447668
@The Aaron it is because I didn't want to run too many scripts and cause problems I'm looking at the links that were provided and going to try and implement them to see if I can get those working correctly.
1426447722
The Aaron
Pro
API Scripter
No problem. If you keep running into that problem, feel free to PM me a join link and GM me and I'll see if I can sort it out for you. =D
1426448777
Gen Kitty
Forum Champion
The Aaron said: Javascript has automatic semicolon insertion, which is a horrible thing that leads to many many errors. Looking at the source of that script, I notice that it has no semicolon or blank line at the end. When you save your API scripts, they get concatenated together into a single script file that is executed for your campaign. If there isn't a semicolon on the last statement and there isn't a blank line after it, it will get joined together into something unintentional, which won't be valid javascript. However, you won't see it because it's an artifact of the concatenation process. Could that explain some of the API halting issues I run into, or would that not be an intermittent thing? I noticed that not all of my scripts end with that semicolin & blank line, and I've added them now to all the scripts that don't have them.
1426453236
The Aaron
Pro
API Scripter
The problem I'm describing would be an immediate error in all the cases I can think of.