Solved cant make jail skript work

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

ShadowFaite

Member
Jul 2, 2018
19
0
1
24
so im making this jail script but i cant make it work properly. it says theres 32 errors..
code_language.skript:
Options:
    prefix: &4&l[JAIL]>

Command /jail [<Offline player>] [<text>]:
    permission: jail.vagt
    permission message: {@prefix} &cDU HAR IKKE ADGANG TIL DENNE KOMMANDO!
    trigger:
        if arg-1 is not set:
            send "&0"
            send "&4&lGRUNDE: &cSlagvagt, Slag, Armor, Våben, Provo, NoPvP, Narko og Hakkebombe"
            send "&4&lKOMMANDO: &c&l/jail (Spiller) (Grund)"
            send "&0"   
            stop
            
        if arg-1 is "Slagvagt":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%command sender% &8med grunden &cSlag på vagt &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}
            
            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på vagt &8i &b6 minutter!"
            wait 6 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}
            
            if player has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på vagt &8i &b7 minutter!"
            wait 7 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop
            
        if arg-1 is "Slag":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på fange &8i &b3 minutter!"
            wait 3 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}

            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på fange &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på fange &8i &b7 minutter!"
            wait 7 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop

        if arg-1 is "armor":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cArmor Besiddelse &8i &b4 minutter!"
            wait 4 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}
            
            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cArmor Besiddelse &8i &b6 minutter!"
            wait 6 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cArmor Besiddelse &8i &b8 minutter!"
            wait 7 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop
            
        if arg-1 is "våben":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cVåben Besiddelse) &8i &b4 minutter!"
            wait 4 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}
            
            permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cVåben Besiddelse &8i &b6 minutter!"
            wait 6 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}
            
            permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cSlag på vagt &8i &b8 minutter!"
            wait 8 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop

        if arg-1 is "Provo":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cProvokerende adfærd &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}
            
            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cProvokerende adfærd &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cProvokerende Adfærd &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop
            
        if arg-1 is "NoPvP":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cNoPvP Abuse &7i &87 minutter!"
            wait 7 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}

            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cNoPvP Abuse &7i &89 minutter!"
            wait 9 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%player% &8med grunden &cNoPvP Abuse &7i &811 minutter!"
            wait 11 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop
            
        if arg-1 is "Narko":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cNarko Besiddelse &8i &b5 minutter!"
            wait 5 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}       
            
            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cNarko Besiddelse &8i &b7 minutter!"
            wait 7 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}   

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cNarko Besiddelse &8i &b9 minutter!"
            wait 9 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}
            stop
            
        if arg-1 is "Hakkebombe":
            permission: c
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::cc}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cHakkebombe &8i &b10 minutter!"
            wait 10 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::cc}   

            if player  has permission "b"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::bb}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cHakkebombe &8i &b12 minutter!"
            wait 12 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::bb}

            if player  has permission "a"
            make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
            teleport arg 1 to {jail::aa}
            broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &4%player% &8med grunden &cHakkebombe &8i &b14 minutter!"
            wait 14 minutes
            make console execute command "/tm msg %arg 1% &aDu er løsladt!"
            teleport arg 1 to {spawn::aa}           
            stop
            
Command /setjailc:
    permission: jail.set
    trigger:
        set location {jail::cc} to location at player
        message "{@prefix} &aNu kan spillere i &c&lC &ablive jailet!"
        
Command /setspawnc:
    permission: spawn.set
    trigger:
        set location {spawn::cc} to location at player
        message "{@prefix} &aDu har nu sat &c&lC &aSpawn!"
        
Command /setjailb:
    permission: jail.set
    trigger:
        set location {jail::bb} to location at player
        message "{@prefix} &aNu kan spillere i &b&lB &ablive jailet!"
        
Command /setspawnb:
    permission: spawn.set
    trigger:
        set location {spawn::bb} to location at player
        message "&aDu har nu sat &b&lB &aSpawn!"
        
Command /setjaila:
    permission: jail.set
    trigger:
        set location {jail::aa} to location at player
        message "{@prefix} &aNu kan spillere i &a&lA&r &ablive jailet!"
        
Command /setspawna:
    permission: spawn.set
    trigger:
        set location {spawn::aa} to location at player
        message "{@prefix} &aDu har nu sat &a&lA&r &aSpawn!"
 
it says something with "permission: c" is not a boolean. it aslo says "permission: b" is not an item type. and then it says that some event location cant be set or something
 
okay, well all the ones that say permission: c.... that's not a thing, im confused why on some lines you have
permission: c
and some you have
if player has permission "b"

change permission: c to
if player has permission "c":

Anytime you have an if statement, it needs to end in colons :emoji_slight_smile:) and the next line following the if statement needs to be indented.
also in your line
if player has permission "b" <-- You have too many spaces between player and has, just use 1 space not 2

for the line
set location {spawn::cc} to location at player
you can't set a location to a location, you can set a VARIABLE to a location, so remove the first "location" in that statement
set {spawn::cc} to location at player

that should about cover your 36 errors
 
thank you so much but theres still 2 errors. it says "empty configuration section" and then it says "arguments cannot be used if the command has multiple arguments"
 
empty config section most likely means you didn't indent,
and yeah, if you have 2 arguments in your command, you cant use arg in your skript, you have to either use arg-1 or arg-2
 
Indented:
code_language.skript:
if arg-1 is "Slagvagt":
            if player has permission "c":
                make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
                teleport arg-1 to {jail::cc}
                broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%command sender% &8med grunden &cSlag på vagt &8i &b5 minutter!"
                wait 5 minutes
                make console execute command "/tm msg %arg 1% &aDu er løsladt!"
                teleport arg 1 to {spawn::cc}
NOT Indented:
code_language.skript:
if arg-1 is "Slagvagt":
        if player has permission "c":
        make console execute command "/tm msg %arg 1% &cDu er blevet sat i jail!"
        teleport arg-1 to {jail::cc}
        broadcast "{@prefix} &d%arg 1% &8Blev sat i jail af &d%command sender% &8med grunden &cSlag på vagt &8i &b5 minutter!"
        wait 5 minutes
        make console execute command "/tm msg %arg 1% &aDu er løsladt!"
        teleport arg 1 to {spawn::cc}
 
Status
Not open for further replies.