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

APIs disabled by one already being declaired?

1670034855

Edited 1670035678
I'm getting an error popping up when I try to run APIs for one of my games. It shows the error message below and disables all of my APIs. I'm not sure what the problem is because I don't get this issue with any of my other games and they all use the same APIs. Anyone know what might be causing this? Edit: Here is a list of my current APIs. G  DeathTracker G  TokenMod G  TurnMarker1 G  libInline G  SmartAoE G  GroupInitiative G  GroupCheck GroupCheck/ApplyDamage auto buttons SyntaxError: Identifier 'autoButtons' has already been declared"
1670037251
timmaugh
Forum Champion
API Scripter
If you pasted the code, see if you pasted it twice in the same tab. If you disable that script and the error goes away, try to run auto buttons. If it doesn't run, then all off the code that would answer that call is on that one tab, and it's likely you pasted it there twice.
That may have been it. I tried deleting auto buttons and it stated to work. Even auto buttons. I must have copied it somewhere I didn't intend to. Thanks for responding.
1670113954
Oosh
Sheet Author
API Scripter
Yep, sounds like you've pasted it onto the end of one of the other scripts. I really should get around to submitting it to the one-click...