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

[SCRIPT HELP] CHATSETATTR no longer allowing in-line rolls in commands

1686087770

Edited 1686087801
Hello scriptomancers. I posted the other day about an issue I was having with Chatsetattr not allowing rounding functions.  Turns out it was actually the in-line rolls that were broken.  Every macro I have that had an in-line roll as part of the command syntax ended up breaking the sandbox.  For some reason, it works fine when you put the command line within a roll template, but not as a stand-alone command. In other words, this works: @{selected|wtype}&{template:dmg} {{rname=Cure Wounds}} {{range=Touch @{target|token_name}}} {{damage=1}} {{dmg1flag=1}} !modbattr --name @{target|character_name} --silent --hp|+{{dmg1=[[1d8 + 5]]}} !!! {{dmg1type=Healing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} 0 {{desc=}} {{hldmg=}} {{spelllevel=?{Cast at what level?}} {{innate=}} {{globaldamage=[[0]]}} {{globaldamagetype=@{selected|global_damage_mod_type}}} ammo= {{spelldesc_link=[Show Spell Description](~-NCGeMe-T_M-pSwIke0G|repeating_attack_-NJRPBVgEBvQjhi1el1j_spelldesc_link)}} @{selected|charname_output} But this breaks the sandbox: !modbattr --name @{target|character_name} --hp|+[[1d8+5]] I am not sure if it is related, but this issue started after I opted in to the new UI menu style, then quickly opted back out again. Wha happened?
1686110230
GiGs
Pro
Sheet Author
API Scripter
I'd suggest creating another campaign that has never used the new UI, and add chatSetAttr to the campaign and see if chatSetAttrs works now. If so, use the transmofrifier to copy everything you need to the new campaign.
Process of elimination determined the ZeroFrame script to be the culprit. I have brought it to @timmaugh's attention.
1686503743
timmaugh
Pro
API Scripter
Hmm... I am using the new menu, but I can't recreate this error. If I run your command, I see the change happen to the selected character. What versions of the scripts do you have installed? If you want, you can use ScriptInfo and just issue the command: !scriptinfo Here is my output:
It all seem to have sorted itself out. The error no longer occurs...
1686527404
timmaugh
Pro
API Scripter
Excellent! I think. I mean, it would have been good to know what caused the error, but most likely it was something with the new menu that the devs fixed. Let me know if anything crops up again!
Hey again, @timmaugh. I realized this morning that I did not turn ZeroFrame back on when I double checked it last night.  The Fetch issue with Scriptcards seems to be resolved, but when I re-eneabled ZeroFrame, the error with Chatsetattr recurred.   I am using the Latest version of each script from the API Dropdown, so ZeroFrame 1.1.6 and Scriptcards 2.3.5. Chatsetattr does not appear when I run the !scriptinfo command, but according to my console log it is v1.1.0.
1686578885
timmaugh
Pro
API Scripter
Hmm. Can you send me a PM invite so I can take a look?
For anyone viewing along from home, I declare unto the lands that @timmaugh is a veritable genious, verily.  He courageously tracked down the errant code and slew it! In case you were wondering, it was an issue with the Flight script.  Tim has addressed it and submitted the update to the 1-click repository.  What a guy!