
I'm trying to nab a defense value from a token like so: var nDefense = getAttrByName(commands['target_id'], commands['defense']); log('GOT DEFENSE: ' + nDefense); where commands['target_id'] is passed in from the macro as @{target|token_id} and commands['defense'] is 'dodge' in this case. When I run that code, I get: "Invalid character_id -KB3sv-t1vXFMD_xH-Ux for getAttrByName()" However, I can do: var target = getObj('graphic', commands['target_id']); target.set("bar1_value", commands['rank']); and I see the correct value go through to the target token. What's the deal? Or is there a smarter way to get attributes from a token?