1

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"}}
  • 1
    Can you narrow this down to only the section needed? It looks like you've added a whole lot of unneccessary parts. – Frank Jan 17 '16 at 18:33
  • Well, the problem is happening with almost the whole code, but yeah, I'll narrow it down. {ench:[{id:0,lvl:1000}],Unbreakable:1,display:{Name:"Protection Armor"}} does that help? – TheDerpMaster Jan 17 '16 at 18:38
  • Why are you putting // and stuff in? – APCoding Jan 17 '16 at 18:39
  • Because you need that to make a custom book. – TheDerpMaster Jan 17 '16 at 18:40
  • I'm gonna need some help QUICK. I'm gonna post it to pastebin.com once I'm done, so if you want this command, I'm gonna need some answers. – TheDerpMaster Jan 17 '16 at 18:58
3

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
  • Thanks for the answer! I completely get it now...you are a great explainer, you know that? XD anyways, the command will be posted soon! Get ready! The link will be posted on this page once it's done. – TheDerpMaster Jan 17 '16 at 19:05
  • NEW PROBLEM it says now that there is an invalid \" i dont know where though because it shows that it is invalid before showing the WHOLE ENTIRE COMMAND my god this is confusing – TheDerpMaster Jan 17 '16 at 19:37
  • There will be a new question so get ready for the whole command. – TheDerpMaster Jan 17 '16 at 19:39
  • Note that you generally want to create a /trigger, as this can be called from any player, even without cheats. – YoYoYonnY Dec 10 '16 at 11:16
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.