1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Punishment GUI

Discussion in 'Skript' started by Goose, Nov 25, 2019.

Thread Status:
Not open for further replies.
  1. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Hi, I get three errors when I load my skript and when I run the skript it goes into the punishment menu but it scrolls through all the pages in about 3 seconds (1 second passes and then goes to the next page), can you help?

    ERRORS:

    ```
    The command doesn't have a 2nd argument (punish.sk, line 75: execute player command "tempban %arg 2% %arg 3% %arg%"')
    The command doesn't have a 2nd argument (punish.sk, line 77: execute player command "tempmute %arg 2% %arg 3% %arg%"')
    The command doesn't have a 2nd argument (punish.sk, line 79: execute player command "tempwarn %arg 2% %arg 3% %arg%"')
    ```

    CODE:

    ```

    #functions
    function i(t: text, p: player):
    make {_p} execute command "/punish %{_t}%"
    #command
    command /punish [<offline player>]:
    trigger:
    #gui
    open virtual chest with 2 rows named "&4&lPunishment Menu" to player
    format gui slot 9 of player with light gray stained glass pane named "&4"
    format gui slot 10 of player with light gray stained glass pane named "&4"
    format gui slot 11 of player with red terracotta named "&4Ban" to close then run function i("ban", player)
    format gui slot 12 of player with light gray stained glass pane named "&4"
    format gui slot 13 of player with orange terracotta named "&6Mute" to close then run function i("mute", player)
    format gui slot 14 of player with light gray stained glass pane named "&4"
    format gui slot 15 of player with yellow terracotta named "&eWarn" to close then run function i("warn", player)
    format gui slot 16 of player with light gray stained glass pane named "&4"
    format gui slot 17 of player with light gray stained glass pane named "&4"
    wait 15 tick
    #length of punishment
    arg-1 is "ban":
    open virtual chest with 3 rows named "&4&lPunishment Length" to player
    format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("ban", player, "3000mo")
    format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("ban", player, "12mo")
    format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("ban", player, "6mo")
    format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("ban", player, "3mo")
    format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("ban", player, "1mo")
    format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("ban", player, "7d")
    format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("ban", player, "1d")
    arg-1 is "mute":
    open virtual chest with 3 rows named "&4&lPunishment Length" to player
    format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("mute", player, "3000mo")
    format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("mute", player, "12mo")
    format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("mute", player, "6mo")
    format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("mute", player, "3mo")
    format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("mute", player, "1mo")
    format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("mute", player, "7d")
    format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("mute", player, "1d")
    arg-1 is "warn":
    open virtual chest with 3 rows named "&4&lPunishment Length" to player
    format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("warn", player, "3000mo")
    format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("warn", player, "12mo")
    format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("warn", player, "6mo")
    format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("warn", player, "3mo")
    format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("warn", player, "1mo")
    format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("warn", player, "7d")
    format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("warn", player, "1d")
    wait 15 tick
    #reason of punishment
    arg-1 is "ban":
    format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("ban", player, "3000mo", "Malicious Hacks (or similar)")
    format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("ban", player, "12mo", "Griefing another's base (or similar)")
    format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("ban", player, "6mo", "Raiding another's base (or similar)")
    format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("ban", player, "3mo", "Spreading hate/toxicity to others")
    format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("ban", player, "1mo", "Disobeying staff")
    format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("ban", player, "7d", "Fighting with players/staff")
    format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("ban", player, "1d", "Speaking about sensitive/controversial topics")
    arg-1 is "mute":
    open virtual chest with 3 rows named "&4&lPunishment Length" to player
    format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("mute", player, "3000mo", "Malicious Hacks (or similar)")
    format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("mute", player, "12mo", "Griefing another's base (or similar)")
    format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("mute", player, "6mo", "Raiding another's base (or similar)")
    format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("mute", player, "3mo", "Spreading hate/toxicity to others")
    format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("mute", player, "1mo", "Disobeying staff")
    format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("mute", player, "7d", "Fighting with players/staff")
    format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("mute", player, "1d", "Speaking about sensitive/controversial topics")
    arg-1 is "warn":
    format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("warn", player, "3000mo", "Malicious Hacks (or similar)")
    format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("warn", player, "12mo", "Griefing another's base (or similar)")
    format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("warn", player, "6mo", "Raiding another's base (or similar)")
    format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("warn", player, "3mo", "Spreading hate/toxicity to others")
    format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("warn", player, "1mo", "Disobeying staff")
    format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("warn", player, "7d", "Fighting with players/staff")
    format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("warn", player, "1d", "Speaking about sensitive/controversial topics")
    arg-1 is "ban":
    execute player command "tempban %arg 2% %arg 3% %arg 4%"
    arg-1 is "mute":
    execute player command "tempmute %arg 2% %arg 3% %arg 4%"
    arg-1 is "warn":
    execute player command "tempwarn %arg 2% %arg 3% %arg 4%"
    ```

     
  2. Best Answer:
    Post #4 by BrettPlayMC, Nov 26, 2019
  3. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Format it using code blocks.
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Code blocks??? Where and how
    --- Double Post Merged, Nov 26, 2019, Original Post Date: Nov 26, 2019 ---
    Oh, I get you. Sorry, here is the code:


    Code (Text):
    1. #functions
    2. function i(t: text, p: player):
    3. make {_p} execute command "/punish %{_t}%"
    4. #command
    5. command /punish [<offline player>]:
    6. trigger:
    7. #gui
    8. open virtual chest with 2 rows named "&4&lPunishment Menu" to player
    9. format gui slot 9 of player with light gray stained glass pane named "&4"
    10. format gui slot 10 of player with light gray stained glass pane named "&4"
    11. format gui slot 11 of player with red terracotta named "&4Ban" to close then run function i("ban", player)
    12. format gui slot 12 of player with light gray stained glass pane named "&4"
    13. format gui slot 13 of player with orange terracotta named "&6Mute" to close then run function i("mute", player)
    14. format gui slot 14 of player with light gray stained glass pane named "&4"
    15. format gui slot 15 of player with yellow terracotta named "&eWarn" to close then run function i("warn", player)
    16. format gui slot 16 of player with light gray stained glass pane named "&4"
    17. format gui slot 17 of player with light gray stained glass pane named "&4"
    18. wait 15 tick
    19. #length of punishment
    20. arg-1 is "ban":
    21. open virtual chest with 3 rows named "&4&lPunishment Length" to player
    22. format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("ban", player, "3000mo")
    23. format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("ban", player, "12mo")
    24. format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("ban", player, "6mo")
    25. format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("ban", player, "3mo")
    26. format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("ban", player, "1mo")
    27. format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("ban", player, "7d")
    28. format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("ban", player, "1d")
    29. arg-1 is "mute":
    30. open virtual chest with 3 rows named "&4&lPunishment Length" to player
    31. format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("mute", player, "3000mo")
    32. format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("mute", player, "12mo")
    33. format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("mute", player, "6mo")
    34. format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("mute", player, "3mo")
    35. format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("mute", player, "1mo")
    36. format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("mute", player, "7d")
    37. format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("mute", player, "1d")
    38. arg-1 is "warn":
    39. open virtual chest with 3 rows named "&4&lPunishment Length" to player
    40. format gui slot 9 of player with red terracotta named "&c&lPermanent" to close then run function i("warn", player, "3000mo")
    41. format gui slot 10 of player with red terracotta named "&c&l1 Year" to close then run function i("warn", player, "12mo")
    42. format gui slot 11 of player with red terracotta named "&c&l6 Months" to close then run function i("warn", player, "6mo")
    43. format gui slot 12 of player with red terracotta named "&c&l3 Months" to close then run function i("warn", player, "3mo")
    44. format gui slot 13 of player with red terracotta named "&c&l1 Month" to close then run function i("warn", player, "1mo")
    45. format gui slot 14 of player with red terracotta named "&c&l1 Week" to close then run function i("warn", player, "7d")
    46. format gui slot 15 of player with red terracotta named "&c&l1 Day" to close then run function i("warn", player, "1d")
    47. wait 15 tick
    48. #reason of punishment
    49. arg-1 is "ban":
    50. format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("ban", player, "3000mo", "Malicious Hacks (or similar)")
    51. format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("ban", player, "12mo", "Griefing another's base (or similar)")
    52. format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("ban", player, "6mo", "Raiding another's base (or similar)")
    53. format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("ban", player, "3mo", "Spreading hate/toxicity to others")
    54. format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("ban", player, "1mo", "Disobeying staff")
    55. format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("ban", player, "7d", "Fighting with players/staff")
    56. format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("ban", player, "1d", "Speaking about sensitive/controversial topics")
    57. arg-1 is "mute":
    58. open virtual chest with 3 rows named "&4&lPunishment Length" to player
    59. format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("mute", player, "3000mo", "Malicious Hacks (or similar)")
    60. format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("mute", player, "12mo", "Griefing another's base (or similar)")
    61. format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("mute", player, "6mo", "Raiding another's base (or similar)")
    62. format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("mute", player, "3mo", "Spreading hate/toxicity to others")
    63. format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("mute", player, "1mo", "Disobeying staff")
    64. format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("mute", player, "7d", "Fighting with players/staff")
    65. format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("mute", player, "1d", "Speaking about sensitive/controversial topics")
    66. arg-1 is "warn":
    67. format gui slot 9 of player with red terracotta named "&c&lMalicious Hacks (or similar)" to close then run function i("warn", player, "3000mo", "Malicious Hacks (or similar)")
    68. format gui slot 10 of player with red terracotta named "&c&lGriefing another's base (or similar)" to close then run function i("warn", player, "12mo", "Griefing another's base (or similar)")
    69. format gui slot 11 of player with red terracotta named "&c&lRaiding another's base (or similar)" to close then run function i("warn", player, "6mo", "Raiding another's base (or similar)")
    70. format gui slot 12 of player with red terracotta named "&c&lSpreading hate/toxicity to others" to close then run function i("warn", player, "3mo", "Spreading hate/toxicity to others")
    71. format gui slot 13 of player with red terracotta named "&c&lDisobeying Staff" to close then run function i("warn", player, "1mo", "Disobeying staff")
    72. format gui slot 14 of player with red terracotta named "&c&lFighting with players/staff" to close then run function i("warn", player, "7d", "Fighting with players/staff")
    73. format gui slot 15 of player with red terracotta named "&c&lSpeaking about sensitive/controversial topics" to close then run function i("warn", player, "1d", "Speaking about sensitive/controversial topics")
    74. arg-1 is "ban":
    75. execute player command "tempban %arg 2% %arg 3% %arg 4%"
    76. arg-1 is "mute":
    77. execute player command "tempmute %arg 2% %arg 3% %arg 4%"
    78. arg-1 is "warn":
    79. execute player command "tempwarn %arg 2% %arg 3% %arg 4%"
     
  5. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    You need to do:
    Code (Text):
    1. command /punish [<offline player>] [<text>] [<text>]:
     
  6. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Ok, thanks! I'll try it tomorrow when I have the opportunity.
     
  7. RainPlayzYT

    RainPlayzYT New Member

    Joined:
    Nov 28, 2019
    Messages:
    7
    Likes Received:
    0
    Goose, What Skript Addons do you use to make this? I think i might be able to solve some other errors/recommend certain Addons to help this skript Work better.
     
  8. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    All the addons I have are Ersatz, Sk-NBeeT, Sk-Perm, skDragon, skLib, skQuery, skRayFall, Skuniversal, SkVault, Tablisknu and TuSKe
     
  9. RainPlayzYT

    RainPlayzYT New Member

    Joined:
    Nov 28, 2019
    Messages:
    7
    Likes Received:
    0
    Hm... If you have all of those addons I don't understand why your skript still has some errors. I will thoroughly check through your skript. If I find something wrong I will report back to you.
     
  10. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Oh, Hardcoding everything
     
  11. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Is that a bad thing? I'm somewhat new to Skript so I don't know a lot about it.
     
  12. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    You could use functions to open GUIs
     
  13. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    How do I do that?
     
  14. bigboybigboi

    bigboybigboi New Member

    Joined:
    Nov 26, 2019
    Messages:
    8
    Likes Received:
    0
    Lmao indent this
     
Thread Status:
Not open for further replies.

Share This Page

Loading...