Kurt J. said: Patrick said: Hey folks, got another script question for the pros here. Came back after some downtime and updated my powercards, and now my scan macro is kicking back this error: No attribute was found for targeted token by the name of background
SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found.
The script is as follows: !power {{
--whisper|@{selected|character_name}
--name|Scan
--tokenid|@{selected|token_id}
--Action|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health.
--hroll|[[ [$HPchecker] @{target|Target1|bar3} / @{target|Target1|bar3|max} * 100 + 0d0]]
--?? $HPchecker < 10 ?? Status|Another hit and @{target|Target1|token_name} will surely collapse, dead to the world.
--?? $HPchecker >= 10 AND $HPchecker < 30 ?? Status|@{target|Target1|token_name} is barely able to stand. Significant blood loss has left them pale, and their every movement looks like a strain.
--?? $HPchecker >= 30 AND $HPchecker < 50 ?? Status|Serious injuries cover @{target|Target1|token_name}'s body. They need healing or a great deal of rest, and soon.
--?? $HPchecker >= 50 AND $HPchecker < 70 ?? Status|@{target|Target1|token_name} is battered, but still standing. Healing would help, but they will probably make it without.
--?? $HPchecker >= 70 AND $HPchecker < 90 ?? Status|@{target|Target1|token_name} has a few cuts and scrapes, but nothing that cannot heal on it's own.
--?? $HPchecker >= 90 ?? Status|@{target|Target1|token_name} appears completely healthy.
--Description*1|@{target|Target1|bar2|max} &{noerror}
--Description*2|@{target|Target1|background} &{noerror}
}}
/w gm inspected @{target|Target1|token_name}
The objective being a player clicks their [Scan] button, then the target, whether it be a creature or an object to be inspected, and the script returns basic descriptive information from either Target1|bar2|max or Target1|background. Any suggestions? For this line: --Description*2|@{target|Target1|background} &{noerror} Does the target character have an attribute called "background"? That's the only obvious thing I see based on the error message. Hey Kurt, no. The goal there is to use the {noerror} flag to remove the line if it throws an error, such as if the target either has no bar2|max or background. Like I said, it worked before I updated the back end, but I couldn't tell you when the last time I had updated it.