-1

I just need help on a command:

/summon Villager ~1 ~ ~ {Profession:0,CustomName:"Potion trader",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8194,tag:{CustomPotionEffects:[{Id:1, Amplifier:3, Duration:1800},{Id:17, Amplifier:3, Duration:1800}],display:{Name:"Speed Potion",Lore:[ "Une potion magique qui permet de gagner en rapidité mais donne faim à l'utilisateur.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8201,tag:{CustomPotionEffects:[{Id:2, Amplifier:2, Duration:1800},{Id:5, Amplifier:1, Duration:1800}],display:{Name:"Strength Potion",Lore:[ "Une potion qui donne une force incroyable, mais rends l'utilisateur très lent.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8193,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:6000},{Id:10, Amplifier:2, Duration:5000}],display:{Name:"Regeneration Potion",Lore:[ "Une potion qui permet de régénerer son utilisateur, mais donne la nausée", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:8206,tag:{CustomPotionEffects:[{Id:11, Amplifier:2, Duration:1800},{Id:18, Amplifier:15, Duration:1800}],display:{Name:"Resistance Potion",Lore:[ "Une potion qui permet de rendre son utilisateur plus résistant mais moins fort.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:35},maxUses:9999999,sell:{id:373,Count:1,Damage:8197,tag:{CustomPotionEffects:[{Id:2, Amplifier:3, Duration:1200},{Id:17, Amplifier:2, Duration:1200},{Id:21, Amplifier:1, Duration:900},{Id:22, Amplifier:1, Duration:900}],display:{Name:"Health Boost Potion",Lore:[ "Une potion donnant de la vie en plus à son utilisateur mais le rend plus lent et lui donne faim.", "PEU COMMUN"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald_block",Count:64},maxUses:9999999,sell:{id:373,Count:1,Damage:8195,tag:{CustomPotionEffects:[{Id:5, Amplifier:5, Duration:6000},{Id:11, Amplifier:5, Duration:6000},{Id:15, Amplifier:1, Duration:6300},{Id:21, Amplifier:5, Duration:6000},{Id:22, Amplifier:5, Duration:6000}]},display:{Name:"Potion gouttes de lune",Lore:[ "Une potion très rare rendant son utilisateur très puissant mais lui enlevant la vue", "TRES RARE"]}},rewardExp:false},{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:373,Count:1,Damage:16386,tag:{CustomPotionEffects:[{Id:2, Amplifier:1, Duration:200},{Id:14, Amplifier:1, Duration:300}],display:{Name:"Potion de camouflage",Lore:[ "Une potion pour se camoufler lors des assassinats ou vols.", "RARE"]}},MaxUses:9999999},rewardExp:false},{buy:{id:"emerald",Count:40},maxUses:9999999,sell:{id:373,Count:1,Damage:16395,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:400},{Id:19, Amplifier:2, Duration:200}],display:{Name:"Poison Potion",Lore:[ "Une potion d'assassinat qui empoisonne.", "RARE"]}},rewardExp:false},{buy:{id:"emerald_block",Count:5},maxUses:9999999,sell:{id:373,Count:1,Damage:16388,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:600},{Id:18, Amplifier:15, Duration:600},{Id:19, Amplifier:5, Duration:300}],display:{Name:"Strong Poison Potion",Lore:[ "Une potion de poison plus puissante qui affaiblis aussi les personnes touchées", "TRES RARE"]}},rewardExp:false},{buy:{id:"emerald_block",Count:35},maxUses:9999999,sell:{id:373,Count:1,Damage:16392,tag:{CustomPotionEffects:[{Id:2,Amplifier:3,Duration:600},{Id:4,Amplifier:3,Duration:600},{Id:9,Amplifier:1,Duration:800},{Id:15,Amplifier:1,Duration:500},{Id:18,Amplifier:30,Duration:800},{Id:20,Amplifier:5,Duration:400}],display:{Name:"Wither potion",Lore:["Une potion mortelle.","MYTHIQUE"]}}},rewardExp:false}]}}}}

I know this is a bit too long, but can you help me? It's saying Unbalanced square brackets, but after many checks I can't see where I failed.

  • 1
    Just saying that this doesn't work isn't enough for us to help you. What error do you get in the command block? If you're not getting an error, what is it doing wrong? – MBraedley Apr 13 '16 at 19:29
  • Told y'a, in the command block they're saying "Data tag parsing failed: Unbalanced square brackets []:" – Fyrens Apr 13 '16 at 19:38
  • Sorry, must have missed that. – MBraedley Apr 13 '16 at 19:39
  • 1
    Generally, dumping a large command and asking us to fix it isn't going to be received well. Rather, shorten the command to the smallest possible piece you can, and still get the error. Show us you've made an attempt to fix it yourself. – Frank Apr 13 '16 at 20:31
7

You had several missing curly braces needed to close offer compound tags. What I do to troubleshoot issues like this is throw the entire thing into a text editor designed for programming, like Sublime Text, or Notepad++. These sorts of editors make it easier to highlight which closing brace corresponds to a given opening brace, and vice versa. Another way to make it easier to look through is to separate list items with newlines, to further improve readability.

The corrected command is as follows. In order to make this compatible with 1.9, I also changed the id of the potions to "potion" instead of 373.

/summon Villager ~1 ~ ~ {Profession:0,CustomName:"Potion trader",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[

{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:1, Amplifier:3, Duration:1800},{Id:17, Amplifier:3, Duration:1800}],display:{Name:"Speed Potion",Lore:[ "Une potion magique qui permet de gagner en rapidité mais donne faim à l'utilisateur.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:2, Amplifier:2, Duration:1800},{Id:5, Amplifier:1, Duration:1800}],display:{Name:"Strength Potion",Lore:[ "Une potion qui donne une force incroyable, mais rends l'utilisateur très lent.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:6000},{Id:10, Amplifier:2, Duration:5000}],display:{Name:"Regeneration Potion",Lore:[ "Une potion qui permet de régénerer son utilisateur, mais donne la nausée", "COMMUN"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:11, Amplifier:2, Duration:1800},{Id:18, Amplifier:15, Duration:1800}],display:{Name:"Resistance Potion",Lore:[ "Une potion qui permet de rendre son utilisateur plus résistant mais moins fort.", "COMMUN"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald",Count:35},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:2, Amplifier:3, Duration:1200},{Id:17, Amplifier:2, Duration:1200},{Id:21, Amplifier:1, Duration:900},{Id:22, Amplifier:1, Duration:900}],display:{Name:"Health Boost Potion",Lore:[ "Une potion donnant de la vie en plus à son utilisateur mais le rend plus lent et lui donne faim.", "PEU COMMUN"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald_block",Count:64},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:5, Amplifier:5, Duration:6000},{Id:11, Amplifier:5, Duration:6000},{Id:15, Amplifier:1, Duration:6300},{Id:21, Amplifier:5, Duration:6000},{Id:22, Amplifier:5, Duration:6000}]},display:{Name:"Potion gouttes de lune",Lore:[ "Une potion très rare rendant son utilisateur très puissant mais lui enlevant la vue", "TRES RARE"]}},rewardExp:false},

{buy:{id:"emerald",Count:25},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:2, Amplifier:1, Duration:200},{Id:14, Amplifier:1, Duration:300}],display:{Name:"Potion de camouflage",Lore:[ "Une potion pour se camoufler lors des assassinats ou vols.", "RARE"]}},MaxUses:9999999},rewardExp:false},

{buy:{id:"emerald",Count:40},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:400},{Id:19, Amplifier:2, Duration:200}],display:{Name:"Poison Potion",Lore:[ "Une potion d'assassinat qui empoisonne.", "RARE"]}},rewardExp:false}},

{buy:{id:"emerald_block",Count:5},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:9, Amplifier:1, Duration:600},{Id:18, Amplifier:15, Duration:600},{Id:19, Amplifier:5, Duration:300}],display:{Name:"Strong Poison Potion",Lore:[ "Une potion de poison plus puissante qui affaiblis aussi les personnes touchées", "TRES RARE"]}},rewardExp:false}},

{buy:{id:"emerald_block",Count:35},maxUses:9999999,sell:{id:"potion",Count:1,tag:{CustomPotionEffects:[{Id:2,Amplifier:3,Duration:600},{Id:4,Amplifier:3,Duration:600},{Id:9,Amplifier:1,Duration:800},{Id:15,Amplifier:1,Duration:500},{Id:18,Amplifier:30,Duration:800},{Id:20,Amplifier:5,Duration:400}],display:{Name:"Wither potion",Lore:["Une potion mortelle.","MYTHIQUE"]}}},rewardExp:false}]}}
  • Thank's man ! I'll use notepad++ in the future to make it easier, thank's for the advice ! :) – Fyrens Apr 13 '16 at 20:19

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