code help

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

Caf3

Member
Sep 30, 2019
15
0
0
19
so i created this code with some helps from people here
Code:
command /hpunish [<offline player>]:
    aliases: /hp
    permission: cstaff.helper.punish
    permission message: &4&lCafeStaff &8» &cYou dont have permission!
    trigger:
        if arg 1 is not set:
            send "&4&lCafeStaff &8» &f/hpunish <player>"
        if arg 1 is set:
            wait 1 tick
            open chest with 3 rows named "&4» &cHelper Punish" to player
            format slot 0 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 1 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 2 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 3 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 4 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 5 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 6 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 7 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 8 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 9 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 17 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 18 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 19 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 20 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 21 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 22 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 23 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 24 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 25 of player with black stained glass named "&7" with lore "&7" to be unstealable
            format slot 26 of player with black stained glass named "&7" with lore "&7Plugin made by:||Caf3" to be unstealable
            format slot 11 of player with feather named "&4&lWarn" with lore "&7Warn %arg 1%" to close
            format slot 15 of player with cooked chicken named "&4&lMute" with lore "&7Mute %arg 1%" to be unstealable
            format slot 13 of player with egg named "&9&lHelper GUI" with lore "&7Player: %arg 1%" to be unstealable
on inventory click:
    if name of player's current inventory contains "&4» &cHelper Punish":
        cancel event
        if name of clicked item is "&7Mute %arg 1%"      
        wait 1 tick
        open virtual chest with 4 rows named "&4» &cHelper Mute" to player
        set slot 14 of player's current inventory to stone named "1 hour"

and its telling me there is 1 error in line 35
im using:
SkQuery, Tuseke, Skellet
Please Help!
Thanks for everyone who answering!!

EDIT: If you want, you can use this code but please tell me or help me about this code.. (probably you have something better)
 
change to:
Code:
if inventory name of player's current inventory is "&4» &cHelper Punish":
 
change to:
Code:
if inventory name of player's current inventory is "&4» &cHelper Punish":
i changed it and now there is 2 errors
upload_2019-10-3_15-40-49.png

[doublepost=1570106542,1570106454][/doublepost]
i changed it and now there is 2 errors
upload_2019-10-3_15-40-49.png
nvm, only one error, this line:
Code:
        if name of clicked item is "&7Mute %arg 1%"
 
Status
Not open for further replies.