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

Nesting Music problem

Okay I'm trying to nest music but I keep getting an error. I'm putting the music list in a character sheet named Music for easy compartmentalization. TypeError: Cannot read property 'substring' of undefined Here is my test macro. ?{Music|Victory,%{Music|Victory}|Defeat,%{Music,Defeat}|} !Roll20AM --play& #44; & #124; Victory by Rauros92 !Roll20AM --play& #44; & #124; Defeat - D&D by JohnCesario What am I missing here?
1513262091
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Well, I notice a few things with your Roll20AM commands. It should be !roll20AM You don't need the comma after the play action keyword since you aren't using any options. Neither of those should cause your roll query issue though. For roll queries it is always best to pull out any repeated sections to simplify the query. Try this: !roll20AM --play|?{Song query here}
1513262145
Ziechael
Forum Champion
Sheet Author
API Scripter
On my phone but your defeat call has a comma instead of a pipe
1513262234
Ziechael
Forum Champion
Sheet Author
API Scripter
Scott C. said: Well, I notice a few things with your Roll20AM commands. It should be !roll20AM You don't need the comma after the play action keyword since you aren't using any options. Neither of those should cause your roll query issue though. For roll queries it is always best to pull out any repeated sections to simplify the query. Try this: !roll20AM --play|?{Song query here} ∆∆ And that ∆∆
I swapped it out for what you said. Got the same error !roll20AM --play|?{Music|Victory,%{Music|Victory}|Defeat,%{Music,Defeat}|} Victory by Rauros92 Defeat - D&D by JohnCesario Are the way they look in my character sheet now
1513278581
The Aaron
Pro
API Scripter
try: !roll20AM --play|?{Music|Victory,%{Music|Victory}|Defeat,%{Music|Defeat}}
Huh, that worked. All you did was remove that last little |. Normally that has no effect, just creates a blank spot at the bottom of the list. Wonder why it was different this time. Thanks!
1513279491
The Aaron
Pro
API Scripter
No, I changed %{Music,Defeat} to %{Music|Defeat} Which I only knew to do from Z's comment further up. =D
Oh the | is called a pipe? I always called it the straight line. I learned something today!
1513288700
The Aaron
Pro
API Scripter
Yeah, it's got lots of names:&nbsp;<a href="https://en.wikipedia.org/wiki/Vertical_bar" rel="nofollow">https://en.wikipedia.org/wiki/Vertical_bar</a>