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

How do I get stats if character names have quotes AND don't match token names?

1599843741

Edited 1599843784
Mike deBoston
Compendium Curator
On one token Represents Character is "Lord Valentin of House Valois", and Name is "Valentin". This macro works: /w "@{selected|character_name}" Strength is: @{selected|strength} On another token Represents Character is 'Jake "the steak" McBeefy' and Name is "Jake". This causes my macro to fail. Is there a general form that will handle names with spaces, quotes, double quotes, and names that don't match character sheets?
1599844515
GiGs
Pro
Sheet Author
API Scripter
You can extract the character name and process it first, but an easier way that should pretty much always work is to use a type of quote that no one is going to use in their name. You can use backticks (found on the key to the left of the 1 on the top bar on UK keyboards), like this: /w `@{selected|character_name}` Strength is: @{selected|strength} Be aware they are not single quotes '.
1599854935
Mike deBoston
Compendium Curator
Ah! Backticks, that's great, thank you!
1599861110
Mike deBoston
Compendium Curator
I spoke too soon. Backticks give me: "Unable to find a player or character with name: `Jake". I tried «», \', and \" ,but no luck. I tried this as a macro and as a macro-mule character ability. Can one macro handle both Irish O'Brien and Jake "the Steak" McBeefy?
1599865103
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try using printer's quotes in the name: Jake “the steak” McBeefy