Minecraft – Incorrect argument for command at position x

minecraft-commandsminecraft-java-edition

In Minecraft snapshot 18w01a, the /execute command syntax has changed (actually this has been around since 17w45a, but that's not the point).

When I use the command execute at @a[x=0,y=4,z=-0,dx=15,dy=1,dz=0] worldborder center 8.0, -8.0 Minecraft gives me an error message saying Incorrect argument for command at position 44 ...[d]y=1,dz=0] <--[HERE].

The selector @a[x=0,y=4,z=-0,dx=15,dy=1,dz=0] uses correct syntax, so what is incorrect about the command?

Best Answer

With the new execute syntax, you must put run before the command you want to run, like this:

execute at @a[x=0,y=4,z=-0,dx=15,dy=1,dz=0] run worldborder center 8.0 -8.0

The error is saying that worldborder is not a valid argument for execute, as it's expecting an execute subcommand (as, at, etc.)