/execute as - Failed to execute error

[Public Server - v1.10 - Vanilla]

I have a chain of commands that I'm running, which includes a command block that increments an armor stand's scoreboard value (used as a counter) when a player is with a specific set of scoreboard values is within a 5 block radius. If I stand at the command block while the player stands there, and change it between Chain/Always Active to Impulse/Always Active (back and forth), the command will eventually execute. Otherwise, the error I get is this:

Failed to execute 'scoreboard players add @e[type=ArmorStand,name=Counter] Count 1' as playername

The command I'm trying to run is:

execute @a[score_param1_min=1,score_param1=1,score_param2_min=1,score_param2=1,score_counter_min=0,score_counter=0] ~ ~ ~ scoreboard players add @e[type=ArmorStand,name=ASCounter] counter 1

Changing the command block from Conditional to Unconditional has not made a difference, and I can confirm that the player is standing in the right spot at the right time.

I also tried changing the command block to a Repeating/Always Active, and no difference either.

I'm at a loss, so any help would be really appreciated. I don't want to remove the /execute as because that could cause some issues for other players down the road if the conditions were just right, and the command needs to be run reliably, or also major potential issues down the road.


Solution 1:

What is most likely happening is that you don't have an armor stand named ASCounter. The best way to test what is actually happening is by doing the command separate from the execute, so /scoreboard players add @e[type=ArmorStand,name=ASCounter] counter 1 Then it will tell what is happening wrong.