Macro is giving really unexpected output

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
CainFortea
Kobold
Posts: 3
Joined: Mon Jul 07, 2014 6:26 pm

Macro is giving really unexpected output

Post by CainFortea »

I'm sure it's some stupid little thing i'm missing, but i've been going over tutorials and the wiki and can't figure this one out.

Here's the code:
Note, Damage, DamageMod, and AtkBonus are token properties. And Apply to Selected Tokens is checked.

Code: Select all

[h: atkroll = 1d20]
[h: atkroll = atkroll + AtkBonus]
[h: NormDamage = eval(Damage)]
[h: ModDamage = eval(DamageMod)]

To Hit:  [atkroll]
<br>
Damage:  [NormDamage]
<br>
Mod:  [ModDamage]
This is the output i'm actually getting,
Note, when I copy/pasted it from the chat window, it was all on one single line.

Code: Select all


To Hit: 15 
Damage: 2 
Mod: Damage: 2 
Mod: Mod: 2
If I take out the "Damage:" and "Mod:" parts, or even just change them to "D" and "M" then it works as expected.

Thank you!

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Macro is giving really unexpected output

Post by Full Bleed »

Disable smilies in your preferences.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

CainFortea
Kobold
Posts: 3
Joined: Mon Jul 07, 2014 6:26 pm

Re: Macro is giving really unexpected output

Post by CainFortea »

Full Bleed wrote:Disable smilies in your preferences.
That is amazing! Thank you so very much. I kept tearing that code apart trying to figure it out!

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Macro is giving really unexpected output

Post by wolph42 »

Full Bleed wrote:Disable smilies in your preferences.
to get b90 where this bug is fixed (among others) link to it in my signature.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Macro is giving really unexpected output

Post by Full Bleed »

CainFortea wrote:That is amazing! Thank you so very much. I kept tearing that code apart trying to figure it out!
Yeah... that bug is annoying. It bit me when I went to b89 as well.

Please note that your players will need to disable smilies as well or their output will be messed up.

Or you can use the b90 Beta as Wolph suggested. ;)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “Macros”