Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate]
I'm trying to make a command that creates a book that has many items with enchantments at level 1,000. However, I don't know why it keeps saying:
Data tag parsing failed: Unbalanced quotation:
{ench:[{id:0,lvl:1000}],Unbreakable:1,display:{Name:"Prot
It's supposed to say "Protection Armor", but it only shows "Prot" for some reason. This is the same with all of my other items. Here is the one part of the command that I've showed you:
{ench:[{id:0,lvl:1000}],Unbreakable:1,display:{Name:"Protection Armor"}}
Best Answer
When you activate a clickEvent via /tellraw or from books, you are clicking as if you've written the command yourself in the chat. This means you are subject to chat limits, being the requirement of OP status and more importantly a 100-character limit. Your command is exceeding that limit, thus gets trimmed and throws an error because the resulting trim breaks syntax.
The fix is to use a shorter commands or rely on an external mechanism to detect players that have clicked. For OP'd players, you can use basic /scoreboard commands. For non-OP'd players, you can use /trigger.
For example, the command you'd have players run in a clickEvent would be:
/scoreboard players set @a[c=1] OBJ 1
And in an external mechanism you would provide the player with that score the item and then reset their score.
/give @a[score_OBJ_min=1,score_OBJ=1] minecraft:stone 1 0
/scoreboard players set @a[score_OBJ_min=1] OBJ 0
Pictures about "Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate]"
![Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Full Frame Shot of Abstract Pattern Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Full Frame Shot of Abstract Pattern](/assets/images/why_am_i_getting_39data_tag_parsing_failed_unbalanced_quotation39_for_this_command_duplicate_1.png)
![Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Silver and Black Laptop Computer Sale Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Silver and Black Laptop Computer Sale](/assets/images/why_am_i_getting_39data_tag_parsing_failed_unbalanced_quotation39_for_this_command_duplicate_2.jpeg)
![Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Man in White Crew Neck T-shirt Holding Red and White Polka Dot Textile Why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate] - Man in White Crew Neck T-shirt Holding Red and White Polka Dot Textile](/assets/images/why_am_i_getting_39data_tag_parsing_failed_unbalanced_quotation39_for_this_command_duplicate_3.jpeg)
Weezer - Why Am I Getting So Upset?
More answers regarding why am I getting 'Data tag parsing failed: Unbalanced quotation' for this command? [duplicate]
Answer 2
Like Skylinerw said, you are subject to chat limits, so the command gets trimmed.
However, command blocks do not have this limit (or at least have an extremely high one).
Place down a command block and put your command in there. Then, run it using a:
- lever
- button
- redstone block
- redstone torch
- powered comparator
- chain command block feeding into it
- powered repeater
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Angela Roma, Sabrina Gelbart, Karolina Grabowska, SHVETS production
