Solved Trouble with console command

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ZsCortzones

Member
Feb 18, 2021
32
1
8
26
So I am trying to make a custom ravager boss what will spawn at certain coordinates and has a custom health of 500 hearts. To automate this process, i decided to put it in a skript loop so that it would be done automatically. I think my problem is due to this command having a lot of quotes, but here is my code and error.

upload_2021-3-7_16-57-42.png


Code:
every 1 minute:
    execute console command "/minecraft:summon minecraft:ravager 285 4 -850 {CustomName:"\"Ravager Boss\"",Attributes:[{Name:"generic.max_health",Base:1000}],Health:1000}"
 
So I am trying to make a custom ravager boss what will spawn at certain coordinates and has a custom health of 500 hearts. To automate this process, i decided to put it in a skript loop so that it would be done automatically. I think my problem is due to this command having a lot of quotes, but here is my code and error.

View attachment 5824

Code:
every 1 minute:
    execute console command "/minecraft:summon minecraft:ravager 285 4 -850 {CustomName:"\"Ravager Boss\"",Attributes:[{Name:"generic.max_health",Base:1000}],Health:1000}"
add double quotes in the single quotes. Like this:

code_language.skript:
execute console command "/minecraft:summon minecraft:ravager 285 4 -850 {CustomName:""\""Ravager Boss\"""",Attributes:[{Name:""generic.max_health"",Base:1000}],Health:1000}"""
 
add double quotes in the single quotes. Like this:

code_language.skript:
execute console command "/minecraft:summon minecraft:ravager 285 4 -850 {CustomName:""\""Ravager Boss\"""",Attributes:[{Name:""generic.max_health"",Base:1000}],Health:1000}"""
The skript reloaded successfully, however when the loop restarts the ravager does not spawn in. I looked through the command and there are no typos in it, so I'm not sure what the problem is
[doublepost=1615171222,1615170896][/doublepost]
add double quotes in the single quotes. Like this:

code_language.skript:
execute console command "/minecraft:summon minecraft:ravager 285 4 -850 {CustomName:""\""Ravager Boss\"""",Attributes:[{Name:""generic.max_health"",Base:1000}],Health:1000}"""
Here is the console log:
upload_2021-3-7_18-40-20.png



EDIT:
I fixed the command by removing the last 2 quotes. Thank you for your help tho!
 
Last edited:
The skript reloaded successfully, however when the loop restarts the ravager does not spawn in. I looked through the command and there are no typos in it, so I'm not sure what the problem is

Remove that last quote and should work.

Also, to avoid confusion, use this
Code:
'
instead of the double quotes in these cases.
 
  • Like
Reactions: ZsCortzones
Status
Not open for further replies.