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 .
×

ChatSetAttr - !modattr: What Am I DOing Wrong?

1780693166

Edited 1780693214
This is specifically for the AD&D1e sheet, but my issue is with ChatSetAttr in a Mod, so I'm posting here. :-) I am using !modattr in a macro button which modifies coins a player character has. It works fine in my macro - here I click a button to add a copper piece: And it works, perfectly. I am working on converting this macro to a Mod. However, while I am getting an initial Macro Options prompt with the Mod I am working on - I only have silver pieces set up ATM - which is just like the one when I click on one of the coin buttons, above: Clicking Submit, !modattr gives me an error: This is what is in the macro that works: [**SP**](!modattr --name @{selected|character_name} --sp|?{Silver Pieces - Please refer to chat tab in right window, you'll need to scroll down - or up. @{selected|character_name} has @{selected|sp} SP. Add or subtract (-)|0}) [[@{selected|sp}]] Silver ([[@{selected|sp}/20]] gp) The following is the code I use to construct the code part of the button. The ---OcDaqKQXSH4zFPblN5i is the --Character ID argument. There is less commentary for the ?prompt than above, but the same two arguments. Here I am using the character ID, and I have tried using the character name. I still get the same error. !modattr ---OcDaqKQXSH4zFPblN5i --sp|?{Silver Pieces - Dwarficus has 100 SP. Add or subtract (-)|0} The character token remains selected throughout the process. Is there anything obvious I am missing from the !modattr?
You didn't include the 'charid' argument. Try this (untested): !modattr --charid -OcDaqKQXSH4zFPblN5i --sp|?{Silver Pieces - Dwarficus has 100 SP. Add or subtract (-)|0}
Jarren said: You didn't include the 'charid' argument. Try this (untested): !modattr --charid -OcDaqKQXSH4zFPblN5i --sp|?{Silver Pieces - Dwarficus has 100 SP. Add or subtract (-)|0} That WORKED!!! Thanks so much, Jarren. :-)