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

(5E by Roll20) Trouble with Universal Chat Menus

I was directed to a very nice API script called Universal Chat Menus to help me to have in-chat character sheets for my players. It can be found here . But it isn't working for me now that I've changed over to a new game. It's giving this error: I don't have much experience with API scripting, so I have no idea what could be wrong with it. Does anyone know what I'm doing wrong here? Thank you, Chris S.
1566513849

Edited 1566514000
GiGs
Pro
Sheet Author
API Scripter
Some questions: is the new game using the same character sheet? what is the text of the chat menus you are using? Which other scripts are running? When does the above error happen? Also, just to test: disable Universal Chat Menus, and see if you still get the error.
It is using the same character sheet, D&D 5E by Roll20. I'm not sure how to check the text of the chat menu, but it should be the default, since I haven't messed with it. No other scripts are running. The error occurs after I have copy/pasted it over, saved the script, and then I get this screen: After that, I load up the game, test the macro and it does nothing on a new character sheet and on an imported one. Then I go back outside the game and check the API section and see the same error message I screen captured above. If I disable it, I don't see any error except one that says I don't have any scripts running. Then, when I enable it again and open the game, the same error comes back as above.
The macro I'm using is the one Keith Curtis points me to over  here  in his post for PC and NPCs.
1566516687
GiGs
Pro
Sheet Author
API Scripter
Thanks, its the text of the macro I was after. I'll test that as soon as I can. I might need to check your campaign, can you send me a join message in PM, and set the two characters to be controlled by ALL Players, so i can look at them if I need to? What is the source of that FILTER message in the first screen shot of the API?
1566516947
GiGs
Pro
Sheet Author
API Scripter
I noticed in that thread, you had problems initially and Keith asked to jump in and help. Did this resolve things? What was the issue there?
1566521200
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Aside from an issue with too many characters in the first campaign, I did the following steps: 1. Verified the behavior on an existing character - error message as Chris details above. 2. Reinstalled the script from my own working copy. 3. Created fresh macros from my own working copies. 4. Tested on existing character and got same error message. 5. Created band new character sheet with very minimal information. 6. Tests with this brand new character yielded correct results with no crash. My conclusion was that there was a problem with the existing characters in the campaign. My suggestion was to create a new campaign from scratch, install only the script and the two macros, and test on compendium dragged fresh characters and new character created from scratch.
1566552369
GiGs
Pro
Sheet Author
API Scripter
It looks like the issue is the [[ and ]] in the macros. The original instructions do say to remove all double brackets with single brackets, but it's easy to overlook that, and it shouldn't be crashing the sandbox if you do. I'll have to check why that's happening, and put up a warning. For now,  simply do a find & replace: [[ to [, and ]] to ]. In the PC macro, they are just in this section, the Jump stats **Jump** - Long [[(@{selected|strength}/2)]] / [[@{selected|strength}]]ft. | High [[((@{selected|strength_mod}+2)/2)]] / [[@{selected|strength_mod}+2]] ft. Change that to **Jump** - Long [(@{selected|strength}/2)] / [@{selected|strength}]ft. | High [((@{selected|strength_mod}+2)/2)] / [@{selected|strength_mod}+2] ft.
1566570254
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's odd. The brackets work in the code in my games (where the macro code is from) regardless of double or single.
1566590363
GiGs
Pro
Sheet Author
API Scripter
It is weird, for sure. Needs more testing.
1566595261

Edited 1566618281
Alright, great, it's working again for monster and player sheets. The only thing, peculiarly, is that the player's prepared spells still don't show up in the macro, although the cantrips do. The code for the NPC spells do work for me, however, so after I copied it over to the player macro, it works beautifully. Excellent work, both of you! My group is going to love this.
1566597194

Edited 1566597208
GiGs
Pro
Sheet Author
API Scripter
The difference between the pc and npc spells is that pc version checks to see if a spell is prepared. So they might not be showing up because the prepared box for them isn't checked. Using the pc version will allow players to only show those spells they have selected as prepared, and keep the menu shorter.