Hello. This is my first time posting so please forgive me if I am making any Forum faux pas. I am trying to create a script card Staff of Fire. I am using the D&D 5Eclassic sheet. The card is designed to programmatically find the staff and its charges in the repeating resources section. It asks the player whether they want to cast one of the spells or to recharge the staff. If the player chooses "Cast", the card asks what spell and gives the choices. The damage for the spell is calculated and displayed, the appropriate number of charges are removed from the sheet, and in the case of Burning Hands and Fireball a template is produced under the player's control so they can show exactly where they want the spell to land. If the player chooses "Recharge" the card rolls the recharge and and adds the appropriate number of charges to the sheet. The card also auto-runs a destruction check if the number of charges is reduced to zero. TLDR: All of the rolling mechanics and sheet interactions are working fine. I am having two issues that I cannot figure out. 1) When the player chooses either Burning Hands or Fireball, the card asks "Which shape?" from the Wall of Force section. It doesn't do anything else from the Wall of Force section, it just fires the query. When the player Chooses "Recharge" in line 19 the card does eventually take them to the Recharge section (Line 105), but it first makes them select a spell (Burning Hands, Fireball, Wall of Fire) and then makes them select a wall shape. The card does not run the spell or do anything with the wall shape, it just forces the player to click through the inquiries before jumping to the recharge section. 2) I created 4 API scripts, each of which spawns in an image of the spell effect sized to act as a template. I have tested all of them individually, and they work when run directly on the character. The card is supposed to call these scripts when it runs one of the spell routines. These appear in Lines 52, 59, 71, and 78. The calls for Burning Hands and Fireball (52 and 59) work perfectly. The damage is calculated, the card fires and the template image appears. When Wall of Force is chosen, and the shape is selected, the damage is calculated and the card fires, but the template image is not spawned. !Ring of Fire and !Wall of Fire each work. The card just doesn't call them. I am placing the code that I have here, I would greatly appreciate any suggestions or help that anyone could offer. !script{{ --#title|Staff of Fire --&character|@{selected|character_id} --=DC|@{selected|spell_save_dc} --#leftsub|Dex Save DC [$DC] --&side|left --Rfind|[&character];StaffofFire;repeating_resource;resource_left_name --?[*R:resource_left_name] -eq "NoRepeatingAttributeLoaded"|[ --&side|right --Rfind|[&character];StaffofFire;repeating_resource;resource_right_name --]| --=charges|[*R:resource_[&side]] --!a:[&character]|[*R>resource_[&side]]:[$charges] --]| --&function|?{Would you like to Cast or Recharge|Cast|Recharge} --?[&function] -eq Cast|Use --]| --?[&function] -eq Recharge|Recharge --]| --:Use| --&Spell|?{Which spell?|Burning Hands|Fireball|Wall of Fire} --c[&Spell]|Burning Hands:=Expendedcharges;1|Fireball:=Expendedcharges;3|Wall of Fire:=Expendedcharges;4 --]| --+|Charges [$charges] --^Check| --:Check| --?[$charges] -lt [$Expendedcharges] |[ --+|You do not have enough charges remaining. --X| --]| --#rightsub|expended charges [$Expendedcharges] --+|[*[&character]:character_name] casts the [&Spell] Spell! --c[&Spell]|Burning Hands:Burninghands|Fireball:Fireball|Wall of Fire:WallofFire --:Burninghands| --=DMG|3d6 --@Burning Hands|!Burning Hands --+|You do [$DMG] Fire Damage! --^Remaining| --]| --:Fireball| --=DMG|8d6 --@Fireball|!Fireball --+|You do [$DMG] Fire Damage! --^Remaining| --]| --:WallofFire| --&Type|?{Which shape?|Wall|Ring} --c[&Type]|Wall:Wall|Ring:Ring --]| --:Wall| --=DMG|5d8 --@Wall of Fire|!Wall of Fire --+|You do [$DMG] Fire Damage! --^Remaining| --]| --:Ring| --=DMG|5d8 --@RingofFire|!Ring of Fire --+|You do [$DMG] Fire Damage! --^Remaining| --]| --:Remaining| --=remainingcharges|[*R:resource_[&side]]-[$Expendedcharges] --!a:[&character]|[*R>resource_[&side]]:[$remainingcharges] --+Remaining Charges|[$remainingcharges] --=dest|1d20 --?[$remainingcharges] -eq 0 -and [$dest] -eq 1 |[ --+Destruction Test|[$dest] --+|[c]Your wand crumbles to dust in your hand[/c] --]| --?[$remainingcharges] -eq 0 -and [$dest] -gt 1 |[ --+Destruction Test|[$dest] --+|[c]Your wand is safe[/c] --]| --]|[ --X| --]| --:Recharge| --=recharge|1d6+1 --=remainingcharges|[*R:resource_[&side]] --=restoredcharges|[$remainingcharges] + [$recharge] {max:10} --!a:[&character]|[*R>resource_[&side]]:[$restoredcharges] --+Your wand regained|[$recharge] charges --+Remaining Charges|[$restoredcharges] --X| }}