We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Accept
Advertisement Create a free account

[ChatSetAttr] [Jakob] charid is not defined.

All of the character macros in my game that use the ChatSetAttr function "!setattr --charid [character_id] ..." function no longer work. I can change them to using --sel and they work, but there are some macros that I want to be able to use without having to select the character. Has anyone else noticed this issue. I think it happened shortly after the sheet workers update. Here is the entire error being displayed ReferenceError: charid is not defined at _.each._.each._.chain.map._.chain.filter.charIDList (apiscript.js:3819:41) at eval (eval at (/home/node/d20-api-server/api.js:146:34), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:34), :70:8) at /home/node/d20-api-server/api.js:1494:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
1487058657
Jakob
Pro
Sheet Author
API Scripter
Yeah, it's  a bug, sorry. The --charid option is broken - either use --name (which is less precise, sorry), or downgrade to 1.1.4, or manually upgrade from my Github. Roll20 hasn't accepted any pull requests for the one-click repo in 3 weeks, which is why the fix isn't online yet.
Thank you so much Jakob for responding. Regarding using --name, would I need to use "@{character_name}" for characters with spaces in their name or should the regular @{character_name} work fine?
In case anyone else is curious for the workaround Jakob suggested above.  !setattr --name @{character_name} ... works the same as my previous method !setattr --charid @{character_name} ...
1487113704
Jakob
Pro
Sheet Author
API Scripter
Yes, using quotes would just confuse my parser! --name should work just the same unless your character name is not unique or contains a comma. In any case, roll20 just accepted the pull request, so starting some time tomorrow --charid should work normally again. 
1487116991
Brian
Sheet Author
API Scripter
Jakob said: Yes, using quotes would just confuse my parser! Sounds like a plug for  splitArgs =D