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] From Error message a mystery to me

1433016350

Edited 1433017071
Good day scripters, I am having some trouble getting a macro to work using the new powercard3 API. The script itself, rolls as it is supposed to. It pulls the correct attributes and even does the correct logic. The only thing I can't figure out is why I am getting this Error. I have looked over all the attribute I have in the macro, the character I am attacking with and the character I am attacking. All have all the stats inputted like they should {or at least as I see it they do). Below is a screen shot of the attack and the Error Also, I can get the token to show in the --tokenid|@{selected|token_id} part of the script but not for one particular token. Hence the MylyycjBVO part of the screenshot. If I select any token on the board for the attack it works with all but MylyycjBVO. Below is a screenshot of the token in question and the macro I am using. !power --tokenid|@{selected|token_id} --emote|A distracting flourish causes the enemy to forget the blade at his throat. {{ --format|atwill --name| Sly Flourish --leftsub|At-Will --rightsub|Standard Action ^^Melee or Ranged ^^Light Blade, Crossbow or Sling --Attack|[[ [$Atk] 1d20 + @{dexterity-mod} [Dexterity Mod] + @{weapon-1-total-attack}]] vs @{target|token_name} AC of [[@{target|AC}]] --?? $Atk base == 1 ?? !CritFail:|Critical Failure --?? $Atk total < [[@{target|AC}]] OR ?? !Miss:|You missed. --?? $Atk total >= [[@{target|AC}]] AND $Atk base <> 1 AND $Atk base <> 20 ?? Hit:|[[ [NH] d@{weapon-1-dice} + @{weapon-1-total-damage} + @{dexterity-mod} + @{charisma-mod}]] martial damage --?? $Atk base == 20 ?? Critical Hit:|[[1*@{weapon-1-dice} + @{weapon-1-total-damage} + @{dexterity-mod} + @{charisma-mod}]] martial damage }} @{weapon-1-total-attack} is @{weapon-1-attack-class}+@{weapon-1-attack-misc}+@{weapon-1-attack-feat}+@{weapon-1-prof}+@{weapon-1-enh}+floor(@{level}/2) And @{weapon-1-total-damage} is the exact same as total attack but with <damage> in replace of all <attack> Thank you, Ryeaa Edit : I just looked in my API scripts and found this error_____"ERROR: Unable to find character target in chat command."_____
1433017670

Edited 1433017735
Weird...
That error message is from the powercards script. It will send that when it can't find a source for a target value. It should only appear when a token or character is targeted that does not have the AC attribute. In the case of a token, it would have to be representing a character to pull that attribute.
1433018386

Edited 1433018440
Try taking the @{target|AC} calls in the conditionals out of the inline rolls. See if that helps. Shouldn't matter... but try anyway. Also, you are missing half the conditional here. There's nothing for it to compare to after the OR. --?? $Atk total < [[@{target|AC}]] OR ?? !Miss:|You missed.
1433019433

Edited 1433019533
HoneyBadger said: Try taking the @{target|AC} calls in the conditionals out of the inline rolls. See if that helps. Shouldn't matter... but try anyway. Also, you are missing half the conditional here. There's nothing for it to compare to after the OR. --?? $Atk total < [[@{target|AC}]] OR ?? !Miss:|You missed. Getting rid of the OR fixed the Error, Thank you. I believe that OR was there when I was trying other things with the script. But I am still unable to get the token to be represented in the macro. I am unsure if it has something to do with that particular token or what...? Thanks, Ryeaa
Ok, I figured out how to get the token to be represented. All I did was go get it again from the Art Library. I do not know why that mattered or why I needed to replace the token with another one of the same token, but it worked. So problem solved. Thank you HoneyBadger for your help, Ryeaa