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

new to roll20, confused by macro syntax error

1585515816

Edited 1586121342
I am playing D&D 3.5 and for the all enemies that I made, I have a similar attack macro. the macro calls [[@{target|armorclass}]] when it attacks to check the ac of the player it is hitting. This works perfectly fine for all players except for one. I cannot find anything unusual in the players AC section, so I cannot find what the error is. when the die roll pops up in chat it works as normal for others saying "the creature swings! hitting with 18 against AC of 16" for example. however, agaisnt this one particular player nothing pops up other than " SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-], [+|\-|*|\/|%] or [0-9] but "o" found. " How can I fix this? the macro is really simple that I am using its just: /em the creature swings! hitting with [[1d20+9]] against AC of [[@{target|armorclass}]]
1585517196
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try: /em the creature swings! hitting with [[1d20+9]] against AC of @{target|armorclass} [[____]] indicates an inline roll, but armorclass is likely just an integer. It's looking to resolve a mathematical expression.
1585518575
Ziechael
Forum Champion
Sheet Author
API Scripter
Armour class is an autocalculated field in the 3.5e sheet, likely there is an error in how the armour has been set up, a screenshot of the target's AC section would help to diagnose set up errors.
keithcurtis said: Try: /em the creature swings! hitting with [[1d20+9]] against AC of @{target|armorclass} [[____]] indicates an inline roll, but armorclass is likely just an integer. It's looking to resolve a mathematical expression. well the exact same macro works with every other character and enemy, only this one character produces the error
Ziechael said: Armour class is an autocalculated field in the 3.5e sheet, likely there is an error in how the armour has been set up, a screenshot of the target's AC section would help to diagnose set up errors. here are screens
1585768305
Ziechael
Forum Champion
Sheet Author
API Scripter
Hmm, there is nothing there that would result in the error you are seeing, what is the character's name? Sometimes that can cause problems although I wouldn't expect it to in this instance :/
1585770040
The Aaron
Roll20 Production Team
API Scripter
keithcurtis said: Try: /em the creature swings! hitting with [[1d20+9]] against AC of @{target|armorclass} [[____]] indicates an inline roll, but armorclass is likely just an integer. It's looking to resolve a mathematical expression. Did you try this version? What do you get if you use this: AC: [@{target|armorclass}] it should say: AC: [20] But if it doesn't, you'll know the issue is with the expansion of that attriibute. Look on the Attributes and Abilities tab for the character and make sure there isn't an Attribute named "armorclass" which is shadowing the autocalc field.
Ziechael said: Hmm, there is nothing there that would result in the error you are seeing, what is the character's name? Sometimes that can cause problems although I wouldn't expect it to in this instance :/ I tried changing the characters name. didn't work.  The Aaron said: keithcurtis said: Try: /em the creature swings! hitting with [[1d20+9]] against AC of @{target|armorclass} [[____]] indicates an inline roll, but armorclass is likely just an integer. It's looking to resolve a mathematical expression. Did you try this version? What do you get if you use this: AC: [@{target|armorclass}] it should say: AC: [20] But if it doesn't, you'll know the issue is with the expansion of that attriibute. Look on the Attributes and Abilities tab for the character and make sure there isn't an Attribute named "armorclass" which is shadowing the autocalc field. I looked in attributes and there is nothing called armorclass. also when i changed it to [@{target|armorclass}] I got a different error. it said the normal attacks and stuff then against " AC of [(10+((1 (0) +0 (0) +0 0 +0 0 +0 0 +0 0))+(1 (ceil(((ceil((4 -20 (100-99 1))/10000000000) 20 - floor((4 -20 (100-99 1)-1)/10000000000) 4 )-floor(abs(9/(0.1))))/10000000000) floor(abs(9/(0.1))) - floor(((ceil((4 -20 (100-99 1))/10000000000) ..." it continued like that for a long time before ending with " (ceil((0 -20 (100-99 1))/10000000000) 20 - floor((0 -20 (100-99 1)-1)/10000000000) 0 )) + (1-0) 0))+-1+(1 0 +0 0 +0 0 +0 0)+(1 orclassnaturalarmor} +1 7 +0 0 +0 0)+(1 0 +0 0 +0 0 +0 0)+(1 1 0 1 +0 1 0 +0 1 0 +0 1 0 +0 1 0 +0 1*0))] " i just grabbed a chunk from the very start nd end of that long block of code. idk what they mean or if there are actual dividers in there. 
1585945801

Edited 1585945936
Ziechael
Forum Champion
Sheet Author
API Scripter
There's your issue: ...))+-1+(1 0 +0 0 +0 0 +0 0)+(1 orclassnaturalarmor } +1 7 +0... Somewhere on the sheet is a incorrectly formatted entry (text instead of a number) or possible a duplicate entry in the attributes list that is mirroring a named attribute in the sheet. The attribute in question likely has part of its name as  naturalarmor
1585946011
Ziechael
Forum Champion
Sheet Author
API Scripter
The reason the code is so long is that the 3.5e sheet uses a calculation made up of multiple other calculations to work out the AC, if even one of those attributes is not a number you will get errors.
Ziechael said: There's your issue: ...))+-1+(1 0 +0 0 +0 0 +0 0)+(1 orclassnaturalarmor } +1 7 +0... Somewhere on the sheet is a incorrectly formatted entry (text instead of a number) or possible a duplicate entry in the attributes list that is mirroring a named attribute in the sheet. The attribute in question likely has part of its name as  naturalarmor Thank you so much! its fixed! it turns out that the AC bonus field beside "current natural armor Bonus" on the first line of the natural armor AC section had been changed to orclassnaturalarmor   When it should have been @{armorclassnaturalarmor}. you can even see it in the screenshot i posted. Thanks for all the help guys!