Error in command? [duplicate]
![Error in command? [duplicate] - Expressive angry businessman in formal suit looking at camera and screaming with madness while hitting desk with fist Error in command? [duplicate] - Expressive angry businessman in formal suit looking at camera and screaming with madness while hitting desk with fist](/assets/images/error_in_command_duplicate_0.jpeg)
//ads -- adsterra.com -- native banner
?>
So this is fairly complicated. I am making a sign, that when clicked, will give you a book, that when you click the text will execute a give command:
/blockdata ~ ~ ~-1 { Text1: "{ text:\"[Click For Book]\", color:dark_blue,clickEvent: { action:run_command, value:{"command":"/give @p written_book 1 0 {pages:%s,title:Book,author:Shop}","jobject":[{"text":"Click For 1 Gold","color":"gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 1"}},{"text":" -------------- "},{"text":"Click For 5 Gold","color":"gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 5"}},{"text":" -------------- "},{"text":"Click For 10 Gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 10"}}],"jtemplate":"book"} }}"}
However when I execute this command it gives me:
[17:10:33] Data tag parsing failed: Unexpected token 'c' at: command":"/give @p written_book 1 0 {pages:%s,title:Book,author:Shop}","jobject":[{"text":"Click For 1 Gold","color":"gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 1"}},{"text":" -------------- "},{"text":"Click For 5 Gold","color":"gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 5"}},{"text":" -------------- "},{"text":"Click For 10 Gold","clickEvent":{"action":"run_command","value":"/scoreboard players add @p Gold 10"}}],"jtemplate":"book"} }}"
I do not understand why I am getting this error, can someone who is good at command proof-scan the command to make sure there are no errors? Thanks!
Best Answer
Try this. It works in 1.8
/setblock x y z wall_sign 0 replace {Text1:"{text:\"Click for book\",color:color,clickEvent:{action:run_command,value:\"/give @p book\"}}",Text2:"{text:\"\",color:color}",Text3:"{text:\"\",color:color}",Text4:"{text:\"\",color:color}"}
Don't mind the text 2-4 coz I just copied this from my Notepad.
Pictures about "Error in command? [duplicate]"
![Error in command? [duplicate] - 1 + 1 = 3 Text on Black Chalkboard Error in command? [duplicate] - 1 + 1 = 3 Text on Black Chalkboard](/assets/images/error_in_command_duplicate_1.jpeg)
![Error in command? [duplicate] - Close-Up Shot of Keyboard Buttons Error in command? [duplicate] - Close-Up Shot of Keyboard Buttons](/assets/images/error_in_command_duplicate_2.jpeg)
![Error in command? [duplicate] - Red and Blue Pelikan Br 40 Eraser on White Surface Error in command? [duplicate] - Red and Blue Pelikan Br 40 Eraser on White Surface](/assets/images/error_in_command_duplicate_3.jpg)
What command is used to duplicate a file?
Use the cp command to create a copy of the contents of the file or directory specified by the SourceFile or SourceDirectory parameters into the file or directory specified by the TargetFile or TargetDirectory parameters.How do you repeat a command in command prompt?
F3: Repeat the previous command. Up/Down Arrow: Scroll backward and forwards through previous commands you've typed in the current session.What is DOS error?
DOS does not recognize the format of the drive being referenced. The disk has been corrupted in some manner and is not readable. This error will also occur if a disk was never formatted properly. Invalid parameter.What are the various error occurs during the DOS command?
Abort, Retry, Fail? Access denied. Bad command or file name. Bad or missing command interpreter.COMANDI CMD: COPY (XCOPY - ROBOCOPY) - MOVE - REPLACE ~ Lezione 9 Batch
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Andrea Piacquadio, George Becker, Miguel Á. Padriñán, Pixabay