2

I want to know what's wrong with this command:

/tellraw @p {text:"You have joined ",color:white,extra:[{text:"Breakfast Baker!",color:green,bold:true,{text:"Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, ",color:white,bold:false,{text:"Villager Ramsay, ",color:orange,{text:"and if you have the best breakfast, you ",color:white,bold:false,{text:"WIN!",color:gold,bold:true}}}}}]}

It says

invalid json: expected name at line 1 column 92

I don't know what's wrong... it's supposed to say

"You have joined Breakfast Baker! Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, Villager Ramsay, and if you have the best breakfast, you WIN!"

With different colors, bold and other flair. Can anyone help?

10
  • So...what's at column 92?
    – Frank
    Jan 20, 2016 at 1:04
  • @Frank How do I find column 92? Sorry if it's a dumb question...
    – milo55545
    Jan 20, 2016 at 1:08
  • 1
    That generally means character 92, when looking at code-type stuff. For this command, that's right after the color:green, but. It says it's looking for a name. I don't work with Minecraft, though, so I have no idea how valid that is.
    – Frank
    Jan 20, 2016 at 1:10
  • 2
    Try using this JSON Creator. I had a play around in it and it seems to be fairly straightforward. Once you have built the command, compare it with your original attempt and see where the issue was.
    – Ben
    Jan 20, 2016 at 1:22
  • 1
    Post the solution as an answer (self-solved problems are often highly regarded) so anyone else that has the same issue can find the solution as well :)
    – Ben
    Jan 20, 2016 at 1:29

3 Answers 3

4

I found this JSON Creator for Minecraft commands, and after having a bit of a play with it, the issue is being caused by the use of the command

extra:[...

The issue is that this section isn't terminated correctly, causing it to throw the error.

Instead, this command can be built in muliptle {text:...} sections, like so:

/tellraw @p ["",{"text":"You have joined ","color":"white"},{"text":"Breakfast Baker! ","color":"green","bold":true},{"text":"Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, ","color":"white","bold":false},{"text":"Villager Ramsay, ","color":"yellow"},{"text":"and if you have the best breakfast, you ","color":"white"},{"text":"WIN!","color":"gold","bold":true}]

Resulting in:

Minecraft /tellraw

1
  • extra was terminated okay-ish. It was the compound tags within extra that weren't closed at the correct position.
    – MrLemon
    Jan 20, 2016 at 10:50
2

color:green,bold:true, { text:"Breakfast Baker

You are opening an object with a curly bracket but did not give it a name before it. That issue is repeated at other points in the command.

If you were intending to use it as another record within the extra list, then you need to close the previous record completely first (by applying a closing curly bracket):

color:green,bold:true } , { text:"Breakfast Baker

Fixed command, applying needed closing curly brackets and removing extra closing brackets at the end:

/tellraw @p {text:"You have joined ",color:white,extra:[{text:"Breakfast Baker!",color:green,bold:true},{text:"Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, ",color:white,bold:false},{text:"Villager Ramsay, ",color:orange},{text:"and if you have the best breakfast, you ",color:white,bold:false},{text:"WIN!",color:gold,bold:true}]}

For 1.9's strict JSON requirement:

tellraw @p {"text":"You have joined ","color":"white","extra":[{"text":"Breakfast Baker!","color":"green","bold":true},{"text":"Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, ","color":"white","bold":false},{"text":"Villager Ramsay, ","color":"orange"},{"text":"and if you have the best breakfast, you ","color":"white","bold":false},{"text":"WIN!","color":"gold","bold":true}]}
1

I got it (: it's

/tellraw @p ["",{"text":"You have joined "},{"text":"Breakfast Baker","color":"green","bold":true},{"text":", a game where you bake breakfast for a judge, ","color":"none","bold":false},{"text":"Villager Ramsay, ","color":"red"},{"text":"and whoever has the best breakfast ","color":"none"},{"text":"WINS!","color":"gold","bold":true}] 

for anyone who is coming on the page to know what's wrong. What's wrong was I forgot to put the } after a text segment so it looked like this: {text:"the text" and no }, so I just fixed it.

Not the answer you're looking for? Browse other questions tagged .