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 .
×

Macros keep getting the same error

I used this forum post to make some macros for my 3.5 game. I got the PC Gen to work and got a bunch of macro scripts but I get this error&nbsp; TypeError: Cannot read property 'substring' of undefined &nbsp;whenever I try any of 'em. One of the macros is&nbsp;&amp;{template:DnD35StdRoll} {{spellflag=true}} {{name=@{character_name}}} {{subtags=casts [Cure Light Wounds](<a href="http://www.d20srd.org/srd/spells/cureLightWounds.htm" rel="nofollow">http://www.d20srd.org/srd/spells/cureLightWounds.htm</a>)}} {{School:=Conjuration [Healing]}} {{Level:=Beguiler 1}} {{Comp'nts:=V, S}} {{Casting Time:=1 standard action}} {{Range:=Touch}} {{Target:=Creature touched}} {{Duration:=Instantaneous}} {{Saving Throw:=Will half (harmless); see text (DC [[ @{spelldc1} ]])}} {{compcheck= Conc: [[ {1d20 + [[ @{concentration} ]] }&gt;?{Concentration DC=15+Spell Level or 10+Damage Received|16} ]] }} {{succeedcheck=The spell is cast successfully.}} {{failcheck=The spell fizzles without effect.}} {{notes=Cures 1d8+5 damage. (PH p.215)}} Even buff spells don't work &amp;{template:DnD35StdRoll} {{spellflag=true}} {{name=@{character_name}}} {{subtags=casts [Blur](<a href="http://www.d20srd.org/srd/spells/blur.htm" rel="nofollow">http://www.d20srd.org/srd/spells/blur.htm</a>)}} {{School:=Illusion [Glamer]}} {{Level:=Beguiler 2}} {{Comp'nts:=V}} {{Casting Time:=1 standard action}} {{Range:=Touch}} {{Target:=Creature touched}} {{Duration:=6 minutes [D]}} {{Saving Throw:=Will negates (harmless) (DC [[ @{spelldc2} ]])}} {{compcheck= Conc: [[ {1d20 + [[ @{concentration} ]] }&gt;?{Concentration DC=15+Spell Level or 10+Damage Received|16} ]] }} {{succeedcheck=The spell is cast successfully.}} {{failcheck=The spell fizzles without effect.}} {{notes=Attacks miss subject 20% of the time. (PH p.206)}} My knowledge of macros is at the copy/paste level so don't even know what wrong to try and fix.
1564644329
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Those look like Abilities, not Macros (due to the way they reference attributes). Usually an attribute reference will need to know which character to get the name of: name=@{selected|character_name} for example, instead of: name=@{character_name} If it is an ability (macro stored on a given character sheet), then the code "knows" which character to reference. Try pasting them into the ability field of a character.