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

What does this code error mean?

I'm writing an Ability macro. It references Attributes's called  DEX which is 0 and DAMAGE which is d6 The Ability reads like this: VOLLEY: 2d6+DEX        (This line is just for displaying what the player/character rolled in the chat window. It's just non-coded text.) /roll 2d6+@{DEX} /roll 1@{DAMAGE} The error I'm getting is this: [{"type":"M","expr":1},{"type":"C","text":"d6 "}] I'm not a coder. I have no idea what this means. I can't even figure it out by putting it in a Google search. I'm pretty sure the problem is NOT that I have extra text there. There are several others Ability macros that look the exactly same to me, but work just fine. Any help would be wonderful. :-)
"/roll 1@{DAMAGE}" I know nothing about coding and very little about Roll20 but there doesn't seem to be a roll in this line. I mean rolls should be in the form of XdY.
The "d" is under the Attribute setting. For the DAMAGE attribute, I put "d6" (without the quotes, of course). It does work in other instances, so I don't think that's the problem. Thanks for the attempt though. :-)
1361875712
Gauss
Forum Champion
First, since the @ belongs inside the braces I assume you actually mean the following:  /roll 2d6+{@DEX}  /roll 1{@DAMAGE} Second,  The format /roll 2d6+{@DEX} will not work because there are no dice rolls inside the braces {}. IF you use parenthesis () it will work.  Example: /roll 2d6+(@DEX) Finally,  The format /roll 1{@DAMAGE} works just fine because @DAMAGE is a dice roll inside braces. I hope this helps. - Gauss
Huh. From my understanding, if your are typing in the formula into the Abilities macro (I think that's what it's called) you would write it out in full text is like this: I want 2 dice using a 6-sided die (2d6), then I want to add a number from my Attributes list (+DEX). So, using the little pop menu thing.. I write 2d6+@DEX. Then, when I copied and pasted it into another character sheet, it would like like this: 2d6+@{DEX}. Then I would close it, and reopen it and it would look like this: 2d6+DEX (where the DEX was blue). Oddly, I got frustrated enough to copy everything over to a regular .TXT file. This eliminated any extra spaces or paragraph returns which I was having problems with when I copied and pasted the formulas. Now, I have an entire character that is working using the 2d6+@{DEX} formula. Yay! I'm not sure why it's working with the @ sign outside of the {} when it's a static number. But since I have one that's working, I think I'll stick with it. Thank you very much for the quick and helpful responses!
Huh. From my understanding, if your are typing in the formula into the Abilities macro (I think that's what it's called) you would write it out in full text is like this: I want 2 dice using a 6-sided die (2d6), then I want to add a number from my Attributes list (+DEX). So, using the little pop menu thing.. I write 2d6+@DEX. Then, when I copied and pasted it into another character sheet, it would like like this: 2d6+@{DEX}. Then I would close it, and reopen it and it would look like this: 2d6+DEX (where the DEX was blue). Oddly, I got frustrated enough to copy everything over to a regular .TXT file. This eliminated any extra spaces or paragraph returns which I was having problems with when I copied and pasted the formulas. Now, I have an entire character that is working using the 2d6+@{DEX} formula. Yay! I'm not sure why it's working with the @ sign outside of the {} when it's a static number. But since I have one that's working, I think I'll stick with it. Thank you very much for the quick and helpful responses!
1361880016
Gauss
Forum Champion
I wasnt thinking about the aspect of doubleclicking on the attribute field. You are correct that the @ winds up outside of the attribute field. What is at work is two different things.  When you type @DEX and get a blue box what it is coded as is @{DEX} However, in the macro system we also use braces { } for containing dice rolls.  You just reminded me that braces now have two uses. One is to contain dice rolls and the other is to contain attributes.  - Gauss
Neat. I complete newbie, helps out the Mentor. :-D Cool. And thanks again for the help. The weird error message must have been from extra spaces or carriage returns. Using a basic .TXT file has made everything work. And more importantly, consistently!
1361885328
Gauss
Forum Champion
Im not just a Moderator, one of the staff around here. But, I am also very tired right now. :) It is almost my bedtime.  - Gauss