Another part of that Reddit discussion suggested replacing the outer pair of double citation marks (") with single citation marks (or apostrophies) (')
but that gave me another error: "Expected value at position 42: ... Command:<--[HERE]"
and I don't really know what to do about that.
The error message says that there should be a value after "Command:". And there is, but the game can't detect it properly because you "escaped" the pair of quotation marks around it. You don't need to do that as they are not within another pair of quotation marks
data merge block 15061 70 15000
{command:"setblock ~ ~ ~ minecraft:chain_command_block{auto:1,Command:" fill 15059 69 14997 15059 69 15003 air"}"}
there is an error message that says "Expected } at pos 104"
for context i need this to reset a command block to its previous state if there is another way pls tell me
Hi,
I think it has to do with the nested citation marks, I found a post on Reddit that says you need to use backslashes to "escape" the nesting.
Like this
\\".......\".....\".....\\"
also, shouldn't the "command:"setblock" have a capital "C"?
Changing those gave me:
/data merge block 15061 70 15000 {Command:\"/setblock ~ ~ ~ minecraft:chain_command_block{auto:1,Command:\\"/fill 15059 69 14997 15059 69 15003 air\\"}\"}
but that gave me another error: "Expected value at position 42: ... Command:<--[HERE]"
and I don't really know what to do about that.
Just testing.
I think I've got it!
Another part of that Reddit discussion suggested replacing the outer pair of double citation marks (") with single citation marks (or apostrophies) (')
https://www.reddit.com/r/MinecraftCommands/comments/2da2bq/how_to_escape_quotes_twice_in_a_command_block/
https://www.reddit.com/r/MinecraftCommands/comments/2da2bq/how_to_escape_quotes_twice_in_a_command_block/cjny0y7/
So:
data merge block 15061 70 15000 {Command:'setblock ~ ~ ~ minecraft:chain_command_block{auto:1,Command:" fill 15059 69 14997 15059 69 15003 air"}'}
Which ran with no errors.
It didn't actually do anything for me since I didn't have a command block at 15061 70 15000 to merge the data into.
(I presume that's what it's supposed to do.)
Good luck!
Just testing.
The error message says that there should be a value after "Command:". And there is, but the game can't detect it properly because you "escaped" the pair of quotation marks around it. You don't need to do that as they are not within another pair of quotation marks
This should work:
Command block engineer // Developer // #TeamTrees