Here is what is in my command block:
execute @p[x=~5,y=~2,z=~17,r=5] ~ ~ ~ /spawnpoint @p[r=1] ~3 ~3 ~-5
I want it to find the nearest player (within 5 blocks) that is standing 5 blocks east, 2 blocks above and 17 blocks south of the command block, and I want it to set the spawnpoint of that player to 3 blocks east, 3 blocks up and 5 blocks north of himself.
The output from the command block is:
[13:50:02] Entity '@p[x=~5,y=~2,z=~17,r=5]' cannot be found
When I am standing directly on the block it should execute on. Any reason for this? Is my command wrong?
EDIT: Just replaced the command block with another command block with the command:
setblock ~5 ~2 ~17 wool
And it placed the block at my feet
EDIT2: Tried replacing the "@p" in the execute with "@a" - did nothing. Also tried replacing the "@p" in the spawnpoint with "@s" - did nothing.