Minecraft – What’s wrong with the command? “The entity UUID provided is in an invalid format”

minecraft-commandsminecraft-java-edition

I am trying to detect if a player has a score with this range, and if so, set down a redstone wire. It says "The entity UUID provided is in an invalid format" and doesn't work. Here is exactly what I put into the command block:

execute @p[score_direction=4,score_direction_min=3] ~ ~ ~ setblock 13 2 7 redstone_wire

I also had another command with a range of 1, not 2:

execute @p[score_direction=1,score_direction_min=1] ~ ~ ~ setblock 13 2 7 redstone_wire

Can anyone tell me what is wrong with this command?

Best Answer

It's because it couldn't find any entity with the direction value between 3 and 4. I tested this command with the executed command changed:

/execute @p[score_direction=4,score_direction_min=3] ~ ~ ~ say FOUND

The executing of the command was succesful after running these 2 commands:

/scoreboard objectives add direction dummy
/scoreboard players set rudygreg direction 3