I have a command that is in a block;
/summon FallingSand ~ ~1 ~ {Block:redstone_block,Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~ ~0 ~1 ~ ~-5 ~1 redstone_block"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~3 ~1 stone},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~4 ~ command_block 0 replace {Command:fill ~ ~2 ~ ~ ~-8 ~1 air}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~-2 ~-1 ~-8 ~2 ~ ~-4 minecraft:leaves"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~-1 ~2 ~-7 ~1 ~3 ~-5 minecraft:leaves"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~ ~-2 ~-6 ~ ~3 ~-6 minecraft:log"}, Time:1,Riding:{id:"FallingSand",Block:stone,Time:1}}}}}}}}
but when I turn it into stone and then replace it with a setblock command which is;
/setblock ~1 ~-4 ~2 minecraft:command_block 0 destroy {Command:"/summon FallingSand ~ ~1 ~ {Block:redstone_block,Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~ ~0 ~1 ~ ~-5 ~1 redstone_block"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~3 ~1 stone},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~4 ~ command_block 0 replace {Command:fill ~ ~2 ~ ~ ~-8 ~1 air}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~-2 ~-1 ~-8 ~2 ~ ~-4 minecraft:leaves"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~-1 ~2 ~-7 ~1 ~3 ~-5 minecraft:leaves"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"/fill ~ ~-2 ~-6 ~ ~3 ~-6 minecraft:log"}, Time:1,Riding:{id:"FallingSand",Block:stone,Time:1}}}}}}}}"}
All I get is an error;
Data tag parsing failed:Unexpexted token 'F' at: FallingSand",Block:command_block, etc... (By the way, this is the fill with redstone blocks command or easier said, the first command_block)
Linked issues
Comments 4
Did that to all "FallingSand" and now I get the same error but instead its '/' and it is the command of the first command block (Basically shortly after the previous error.)
Actually, I no longer need it, but thanks. If yo reply to my previous comment, than I will use that information in case I need it.
It is called escaping. When you have a double quote inside double quotes, it must be escaped:
Escaping
"Some\"Even \\\" \\\" more\" String"
How to escape:
Replace
\ with \\
Replace
" with \"
Note: I am not that familiar with escaping neither so what I say here may not be hundred percent correct
With your command, the problem is that you have double quotation marks at the beginning but all the quotation marks inside the command aren't escaped. However in your case the easiest fix would be to remove all double quotes. Minecraft's NBT parser is pretty tolerant
Don't put FallingSand between quotes.