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

Simple Sounds Macro

1664737832

Edited 1664737843
Zym
Sheet Author
Hi, me again ! I have a macro set up for the API simple sounds.  !?{Sound|!splayCLW|!splayTSS|!splayARW} ?{Sound} The macro does work and plays the sound from a drop down list, yet also fills the chat box with and output   (From Simple Sound Script):  No Track Found... Not game breaking but can I adjust the macro so the code isn't read from the first string? (I think it's called a string, I mean first line) 
1664766748
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try either: !?{Sound|!splay CLW|!splay TSS|!splay ARW} ?{Sound} or !splay ?{Sound|CLW|TSS|ARW} The lack of a space between the !splay and the track name was likely the issue.
1664823665
Zym
Sheet Author
Great Keith. Thanks man. The second script worked.  Wasn't an issue with the spaces.  For some reason 'simple sounds' was picking up something from the first line in the first script and getting error reports in the API console. Not a big issue as the second script is abundantly clear.
1664829363
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The second macro is a lot more elegant and probably more bulletproof.