Custom Commands Error

  • 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.

RadFelix2005

New Member
Jul 9, 2020
7
1
3
18
Hi, I am trying to use skript on my server to create a fun game and while trying to do so the commands and actions that I am creating are creating errors.

My code:
command /start:
description: gives player the generator:
permission: spawn.cube:
permission message: "Hey! Sorry but you're not in the right area to perform that command! Try again in our anarchy cube!":
trigger: execute /give @p minecraft:lime_dye 1 0 {display:{Name:"Generator"}}:

if player right clicks on lime_dye give player 80% cobblestone, 10% dirt, 5% sand, 3% coal, 2% iron:

The error is saying:
Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon if you don't want this line to start a section. (customcommands.sk, line 1: command /start:')

it repeats that up to line 5; trigger: execute /give @p Minecraft:lime_dye 1 0 {display:{Name:"Generator"}}
then starts saying a different error which is:

Cant understand this event.

It also says that the required entry 'trigger' is missing in 'command /start'

I don't know if this is an easy fix or whether I just don't understand something but someone please help me with this.
 
Hi, I am trying to use skript on my server to create a fun game and while trying to do so the commands and actions that I am creating are creating errors.

My code:
command /start:
description: gives player the generator:
permission: spawn.cube:
permission message: "Hey! Sorry but you're not in the right area to perform that command! Try again in our anarchy cube!":
trigger: execute /give @p minecraft:lime_dye 1 0 {display:{Name:"Generator"}}:

if player right clicks on lime_dye give player 80% cobblestone, 10% dirt, 5% sand, 3% coal, 2% iron:

The error is saying:
Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon if you don't want this line to start a section. (customcommands.sk, line 1: command /start:')

it repeats that up to line 5; trigger: execute /give @p Minecraft:lime_dye 1 0 {display:{Name:"Generator"}}
then starts saying a different error which is:

Cant understand this event.

It also says that the required entry 'trigger' is missing in 'command /start'

I don't know if this is an easy fix or whether I just don't understand something but someone please help me with this.
You have to make sure to use the corresponding tabs.
Try this:
code_language.skript:
command /start:
    description: gives player the generator.
    permission: spawn.cube.
    permission message: Hey! Sorry but you're not in the right area to perform that command! Try again in our anarchy cube!
    trigger:
        execute console command "give %player% minecraft:lime_dye 1 0 {display:{Name:""Generator""}}"
I recommend you see tutorials on how to program in skript. Either on youtube, or on the forum. You will be able to orient yourself better.
 
You have to make sure to use the corresponding tabs.
Try this:
code_language.skript:
command /start:
    description: gives player the generator.
    permission: spawn.cube.
    permission message: Hey! Sorry but you're not in the right area to perform that command! Try again in our anarchy cube!
    trigger:
        execute console command "give %player% minecraft:lime_dye 1 0 {display:{Name:""Generator""}}"
I recommend you see tutorials on how to program in skript. Either on youtube, or on the forum. You will be able to orient yourself better.

But how do I get the right-click giving you a different percentage of different blocks? (the last line)
 
But how do I get the right-click giving you a different percentage of different blocks? (the last line)
Somethig like this?
code_language.skript:
command /start:
    description: gives player the generator.
    permission: spawn.cube.
    permission message: Hey! Sorry but you're not in the right area to perform that command! Try again in our anarchy cube!
    trigger:
        execute console command "give %player% minecraft:lime_dye 1 0 {display:{Name:""Generator""}}"

on right click:
    set {_dye} to lime dye named "Generator"
    if player's held item is {_dye}:
        
        chance of 80%:
            add 1 cobblestone to player
            remove 1 of {_dye} from player's inventory
        chance of 10%:
            add 1 dirt to player
            remove 1 of {_dye} from player's inventory
        chance of 5%:
            add 1 sand to player
            remove 1 of {_dye} from player's inventory
        chance of 3%:
            add 1 coal to player
            remove 1 of {_dye} from player's inventory
        chance of 2%:
            add 1 iron ingot to player
            remove 1 of {_dye} from player's inventory
 
When i try and do /skript reload all it comes up with errors stating the line of code expect 0 tabs but instead found 1 space or 4 spaces. Then I try to remove the spaces and another error code comes up saying that if you do not wish to start a section remove the colons, so I remove the colons and it comes up with errors like this:

all code has to be put into triggers
 
When i try and do /skript reload all it comes up with errors stating the line of code expect 0 tabs but instead found 1 space or 4 spaces. Then I try to remove the spaces and another error code comes up saying that if you do not wish to start a section remove the colons, so I remove the colons and it comes up with errors like this:

all code has to be put into triggers
What? Send a screenshot of error message.
 
there it is
 

Attachments

  • Screen Shot 2020-07-24 at 6.36.15 pm.png
    Screen Shot 2020-07-24 at 6.36.15 pm.png
    12.5 KB · Views: 130
Status
Not open for further replies.