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

Referencing wrong Macro

July 05 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I've got a drop down menu macro that I'm setting up to choose between my actions in a game of the Strange I'm playing in. The problem is that the macro triggered from the drop-down is a version of the macro from 2(maybe more months) ago. I'm not sure how this macro is being called at all since it doesn't exist anywhere anymore. If it affects this, the game also had the problem where the chat archive stops updating because of roll templates (Had the GM reset the chat archive to fix that).

Browser: Chrome V 51.0.2704.103 (64-bit)
OS: Mac OSX (10.10.5 Yosemite) (will try on Windows 10 when I get home)
July 05 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Update: Ok, this is really weird now.
If I change the final line entry of the roll template (it should be {{Successive Attack=[calculation]}}) to be {{Successive Attacks=[caluculation}}. The output becomes just the {{name}} line and nothing else. If I change it back, it continues to reference the old macro.
Even weirder; if I change anything else in the roll template, it updates that, but continues to reference the old macro in all other ways.

I should probably specify that the old macro has some ability command buttons that are output in the Successive Attack line along with some other entries in other lines which are still being output even though I deleted them.
July 05 (8 years ago)
Pat S.
Forum Champion
Sheet Author
If you did not mistype your example but actually copied, your final line is misspelled and that would mean you are calling an attribute that is non-existing.

Scott C. said:
Update: Ok, this is really weird now.
If I change the final line entry of the roll template (it should be {{Successive Attack=[calculation]}}) to be {{Successive Attacks=[caluculation}}. The output becomes just the {{name}} line and nothing else.
I would recommend you posting your macro in full so people can see it.

July 05 (8 years ago)

Edited July 05 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, [Calculation] was just a placeholder for what the actual stuff is.
Here is where I wish roll20 had a spoilers type formatting so I could hide these macros, but here are the macros in their entirety:

Actions-2.0:
?{Action|Compound Longbow, %{Fyodor Konstantin (Ardeyn)|Compound-Longbow} |Longsword, %{Fyodor Konstantin (Ardeyn)|Longsword}}

The longsword macro is not roll query compatible yet because I stopped working on this when this error cropped up. The longbow macro is:
Compound-Longbow:
&{template:default& #125; {{name=**Fyodor Konstantin**
@{attack1} & #125;& #125; {{attack=[[1d20]]& #125;& #125; {{Target # Modifier= [[[[?{Effort to hit& #124;0& #125;*-3]][Effort] -3[Heavy Ranged] -3[Archery] + ?{Additional Attack Modifiers(#[description])& #124;0[No Modifiers]& #125;]] & #125;& #125; {{Effort to hit=[[?{Effort to hit& #125;]] & #125;& #125; {{Damage=[[@{attackdmg1}[Weapon Damage] + [[?{Effort to damage& #124; 0 & #125; *3]][Effort] + ?{Pierce& #124;no,0 & #124;yes& #44;1 & #125;[Pierce] + ?{Special Ammo& #124;No& #44;0[No Special Ammo] & #124;Psychic Arrows& #44;2[Psychic Arrows]& #125; ]] & #125;& #125; {{Effort to damage= [[?{Effort to damage& #124; 0 & #125;]] & #125;& #125; {{Max Effort=[[@{effort}]] & #125;& #125; {{Covering Fire=?{Covering Fire?& #124;no& #44; No & #124; Yes& #44; Yes:[[2]] speed & #13;Target's attacks are 1 step more difficult (easier to defend against)& #125; &# 125;& #125; {{Successive Attack= If enemy defeated, make free attack against new target & #125;& #125;

And since it's easier to read, here it is without the html entities:
&{template:default} {{name=**Fyodor Konstantin**
@{attack1} }} {{attack=[[1d20]]}} {{Target # Modifier= [[[[?{Effort to hit|0}*-3]][Effort] -3[Heavy Ranged] -3[Archery] + ?{Additional Attack Modifiers(#[description])|0[No Modifiers]}]] }} {{Effort to hit=[[?{Effort to hit}]] }} {{Damage=[[@{attackdmg1}[Weapon Damage] + [[?{Effort to damage| 0 } *3]][Effort] + ?{Pierce|no,0 |yes,1 }[Pierce] + ?{Special Ammo|No,0[No Special Ammo] |Psychic Arrows,2[Psychic Arrows]} ]] }} {{Effort to damage= [[?{Effort to damage| 0 }]] }} {{Max Effort=[[@{effort}]] }} {{Covering Fire=?{Covering Fire?|no, No | Yes, Yes:[[2]] speed Target's attacks are 1 step more difficult (easier to defend against)} }} {{Successive Attack= If enemy defeated, make free attack against new target }}


But it gives this as the output:

Note the ability command buttons in Successive Attack that are not present in the actual macro, along with the -0 target number and +0 damage lines in Effort to hit and Effort to damage respectively.

EDIT: HTML entities were converted when I posted this replay, have put spaces in them so that they now show up correctly.
July 06 (8 years ago)
What's the macro call that you're using? e.g. %{selected|attack}, etc.
July 06 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The roll query from actions-2.0 calls the compound longbow macro (assuming compound longbow is selected in the prompt.
July 06 (8 years ago)
Try making a new copy of the game and see if the ghosting macro still appears, like I did with that API script.
July 06 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Can't copy the game as I'm not GM, but I suppose I could use the vault to transfer the char to my api sandbox game and try it there.
July 06 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Huh, well, figured out the problem (not sure why it was happening yet). Somehow the roll query was calling both my longbow macro and my longsword macro (which wasn't even html escaped, and shouldn't have been able to work in a query). Changed the second drop-down option in the query to be "nothing" and then it works fine.