How do you use the setblock command in Minecraft Windows 10 edition? [closed]

I am trying to use the setblock command, but it won't work. I tried set block x y z x y z, but it won't work.


The syntax for setblock is this:

setblock <position: x y z> <tileName: Block> [tileData: int] [replace|destroy|keep]

If you’re not doing the command in a command block, you need a / before setblock.

From the wiki:

Arguments

position: x y z
Specifies the position of the block to be changed. May use tilde notation to specify a position relative to the command's execution.

tileName: Block
Specifies the new block. Must be a block id (for example, stone).

tileData: int (optional)
Specifies additional data to further describe the new block. Must be between 0 and 15 (inclusive). If not specified, defaults to 0.

replace|destroy|keep (optional)
Specifies how to handle the block change. Must be one of:

  • destroy — The old block drops both itself and its contents (as if destroyed by a player). Plays the appropriate block breaking noise.
  • keep — Only air blocks will be changed (non-air blocks will be "kept").
  • replace — The old block drops neither itself nor any contents. Plays no sound.

If not specified, defaults to replace.

For example, if you want to place a stone block at the coordinates 4, 3, 53 you would do this:

 /setblock 4 3 53 stone

If you wanted to place orange wool (data value is 1) 3 blocks above you, you would do this:

/setblock ~ ~3 ~ wool 1