I'm using ScriptCards v3 in Roll20 to handle an attack with selectable damage type ("normal" or "crit"). I'm using rbutton to let the player choose between the two, and I'm correctly capturing the value in &reentryval . However, even though the choice appears correctly (confirmed by debug output), the conditional logic using doesn't seem to work. Only the last condition seems to apply, or the danno variable ends up being 0 regardless of the selected option. It's as if the conditions are ignored or not processed correctly during evaluation. I've verified that the modifiers are being loaded properly.
How can I ensure that the correct damage formula is used based on the selected button? !script {{
--#sourceToken|@{selected|token_id}
--#leftsub|[*S:character_name]
--#rightsub|Attacco con triplo vantaggio
--#title|TRIPLO KAIOKEN
--&mod|[*S:dexterity_mod]
--&proficency|[*S:pb]
--=AttackRoll|3d20kh1 + [&mod][DEX] + [&proficency][PROF]
--+Tiro per colpire|[$AttackRoll]
[img]'<a href="https://i.pinimg.com/474x/fb/71/0c/fb710ce1b3a06092370cb3e2f72081d8.jpg" rel="nofollow">https://i.pinimg.com/474x/fb/71/0c/fb710ce1b3a06092370cb3e2f72081d8.jpg</a>'
[/img]
--+|[t width=100% style='text-align:center;']
[tr][td][rbutton]Tira Danni::Danno;normale[/rbutton][/td][/tr]
[tr][td][rbutton]💥CRITICO!::Danno;crit[/rbutton][/td][/tr]
[/t]
--X|
--:Danno|
--&arma|[&reentryval]
--?|[&arma] -eq normale;--=danno|1d8+1 + [&mod][DEX] + 3d6[SNEAKY]
--?|[&arma] -eq crit;--=danno|31[💥CRIT💥]+1d8+1 + [&mod][DEX] + 3d6[SNEAKY]
--+|[t width=100% style='text-align:center;']
[tr][td]💥💥💥 Danno inflitto: [$danno] 💥💥💥[/td][/tr]
[/t]
--X|
}}