
So I'm trying to create a Spell List by stacking a Character Sheet's same Macros one would ordinary macros, like in this video:
https://www.youtube.com/watch?v=8RxRODcMRRo
But it seems to be unable to recall, any Macros from said Character Sheet. I checked the wiki (https://wiki.roll20.net/Macros#Ability_Command_Buttons) but some reason the code just keeps giving an error.
Here's a screenshot of the code in question and the error report being given:
Edit: Changing it to remove the "Character_Name" portion (as the wiki said I could omit this) changes the error to:
TypeError: Cannot read properties of undefined (reading 'substring')
Edit 2: Found the solution, and posting it here incase someone else hits this wall in the future and Google leads them back to here.
Just use this in the Macro instead:
[Macro](! %{Character|Ability})
So in the example of my code above I have it typed out as such:
&{template:default} {{name=@{Selected|Character_Name}'s Spell List}} {{Cantrips=[Spell Name](! %{Default|SpellTemplate}) }}^The Character's name is "Default" since this is the sheet I copy for new PC's.