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

Need help on a API i wrote

Hey guys.  I'm currently working on revamping entirely my old try at a Black Crusade advanced API character sheet, which was originally just me fusing a bunch of codes and assets from two different character sheets.  I created a first barebone version maybe a year or more back, and posted it on the official Github, but it has a bunch of problems and some parts don't work at all, that's currently all fixed but i wanted to add more functionalities to the character sheet, so i tried to actually create a new API that would help me and my group to roll on a table. Problem : it's based on another's (Jack D) code, and i don't understand all of it. I made something that should work in my limited understanding of how the API system actually works, but it doesn't.  I'm at a loss about what to modify to make it work, and i was wondering if any good and experienced soul out there could check the code and maybe tell me why it doesn't work. Here's everything to make the Character sheet work in custom. My problem is with the PsyTable.js API and (maybe?) the button that activates it line 2817 of the html. I know it's not a stupid mistake like forgetting a line breaker or something like that, since the API actually works in the R20 emulator and gives up no error. My guess is that since i didn't really understand how the result is actually sent to the chat, i made a mistake on that front. Much thanks if you read through all of this, and double that if you actually take the time to check the code !  Pixizz aka Sebouh K.
After testing the command in-chat (i just now thought of it ...), the API works fine ... if i call it from the chat. It doesn't work at all if i call it from a button value, when all the other API i use work just fine with the exact same system. I'll be testing a bit more today, see if i can figure it out.
Found the problem ... seems like the value removed all caps when sent to the chat, which then broke since i had caps in my function call. Problem solved, and it was a stupid mistake.