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

[Help] It's broke!

Alright, so first things first. I'm building a campaign that I'm hoping to run with newbies off of a module book. I am attempting to make it as user-friendly as I can, so the character sheet has embedded macros using Power Cards for basically everything. I found one on the forums and have been tweaking it since with help here and there. The original was built using Power Cards 1, and I have since done as much tweaking as I can to make it work with Power Cards 2. However, I was away for about a week and upon returning, it seems something has broken. Every macro I have works except for the attack macros. I have no idea why, I haven't changed anything as I've been gone for a week. I've been digging around for 2 days now, and can't really seems to figure out what's going wrong. I assume it has something to do with the repeating weapons section as that's where all my macros are. The only information I'm really running off of in terms of error reports is: "SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found." This comes up after selecting a target for the macro. I really wasn't sure if this was supposed to go into Character Sheets or API or Mentor forums, so I rolled the dice and picked one. :P
That's an error in the macro itself and is a Roll20 error, not a powercard error. You need to post the macro though, so we can see where the error might be.
1432511934

Edited 1432512087
The button calls for the macro %{selected|repeating_weapon_0_attack} Which is: <span><button type="roll" name="roll_repeating_weapon_0_Attack" title="%{repeating_weapon_0_Attack}" value="!power --bgcolor|blue --txcolor|white --name|@{selected|repeating_weapon_0_name} attack! --leftsub|@{selected|token_name} --rightsub|vs. @{target|token_name} --title|What did you expect to see here? --emote|@{selected|repeating_weapon_0_flavor-text} --Range|@{selected|repeating_weapon_0_range}' --Attack|[[1d20 +@{selected|repeating_weapon_0_proficiency} +(((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]] To Crit:[[@{selected|repeating_weapon_0_crit-target} +(@{selected|repeating_weapon_0_proficiency} + (((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]](@{selected|repeating_weapon_0_crit-multiplier}x) --Crit Confirm|[[1d20 +@{selected|repeating_weapon_0_proficiency} +(((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]] --Damage|[[@{selected|repeating_weapon_0_damage-dice-num}d@{selected|repeating_weapon_0_damage-die} + (@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_damage} + @{selected|repeating_weapon_0_damage-ability}) -@{target|dr}]] @{selected|repeating_weapon_0_type} --^1Weapon Notes|@{selected|repeating_weapon_0_notes} --@{selected|token_name} Melee Notes|@{selected|melee-attack-notes} --@{selected|token_name} Attack Notes|@{selected|attack-notes}!power --whisper| --bgcolor|light blue --txcolor|yellow --name|GM Info --vs. AC|[[@{target|AC}]] --Touch|[[@{target|touch}]] --Flatfooted|[[@{target|flat-footed}]] --Bypass DR|[[@{target|DR}]] @{target|BYPASS} --Defense notes|@{target|defense-notes} --Resistances|@{target|resistances} --Immunities|@{target|immunities} --Weaknesses|@{target|weaknesses}"></button></span> Apologies if that's a little hard to read. :P Also, that is repeated for attacks 0-26, and I have tested each one.
1432518397

Edited 1432518557
vÍnce
Pro
Sheet Author
I few things I noticed. Check your DR on the PF sheet and see if it's a number. If it's text I think it will throw an error when placed inside an inline roll. Just change DR to a number. "0" Or remove the inline --whisper| should be --whisper|GM There isn't a @{BYPASS} or @{flavor-text} attribute on the community PF sheet (you may be using a custom sheet that includes the attribute...?) If you place your powercard script within double curlies you can use line breaks on every tag. Much easier to read/edit/troubleshoot Not sure what version powercard this was added... HB? Cheers. !power {{ --bgcolor|blue --txcolor|white --name|@{selected|repeating_weapon_0_name} attack! --leftsub|@{selected|token_name} --rightsub|vs. @{target|token_name} --title|What did you expect to see here? --emote|@{selected|repeating_weapon_0_flavor-text} --Range|@{selected|repeating_weapon_0_range}' --Attack|[[1d20 +@{selected|repeating_weapon_0_proficiency} +(((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]] To Crit:[[@{selected|repeating_weapon_0_crit-target} +(@{selected|repeating_weapon_0_proficiency} + (((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]](@{selected|repeating_weapon_0_crit-multiplier}x) --Crit Confirm|[[1d20 +@{selected|repeating_weapon_0_proficiency} +(((@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_masterwork}) + abs(@{selected|repeating_weapon_0_enhance} - @{selected|repeating_weapon_0_masterwork})) / 2) + @{selected|repeating_weapon_0_attack} + @{selected|repeating_weapon_0_attack-type} + @{selected|armor-proficiency})]] --Damage|[[@{selected|repeating_weapon_0_damage-dice-num}d@{selected|repeating_weapon_0_damage-die} + (@{selected|repeating_weapon_0_enhance} + @{selected|repeating_weapon_0_damage} + @{selected|repeating_weapon_0_damage-ability}) -@{target|dr}]] @{selected|repeating_weapon_0_type} --^1Weapon Notes|@{selected|repeating_weapon_0_notes} --@{selected|token_name} Melee Notes|@{selected|melee-attack-notes} --@{selected|token_name} Attack Notes|@{selected|attack-notes} }} !power {{ --whisper|GM --bgcolor|light blue --txcolor|yellow --name|GM Info --vs. AC|[[@{target|AC}]] --Touch|[[@{target|touch}]] --Flatfooted|[[@{target|flat-footed}]] --Bypass DR|@{target|DR} @{target|BYPASS} --Defense notes|@{target|defense-notes} --Resistances|@{target|resistances} --Immunities|@{target|immunities} --Weaknesses|@{target|weaknesses}" }}
1432518851

Edited 1432518900
The DR is indeed a number, I added a "Bypass" field for use in the macro so I know immediately if a character's weapon goes through the DR. The flavor-text replaces the macro-text so they can't fiddle with the pre-built macro, but they can change the emote text! ;3 The --whisper|GM might be the issue, thanks a bunch. :) Also the double curlies sounds like a wonderful idea, thanks again!
1432519029
vÍnce
Pro
Sheet Author
I would just break up your macro and try it a chunk at a time to isolate where the problem child is located.
Either the --whisper|GM tag fixed it, or something to do with the line breaks fixed it. Either way it works and I am happy, thank you so much! :)
1432520655
vÍnce
Pro
Sheet Author
Cool beans. Now go out there and kill some stuff. :-)