Solved Punishment GUI

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

Goose

Supporter
Nov 23, 2019
439
33
28
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%"
```
 
Format it using code blocks.
Code blocks??? Where and how
[doublepost=1574738046,1574731036][/doublepost]Oh, I get you. Sorry, here is the code:


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%"
 
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.
 
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.
All the addons I have are Ersatz, Sk-NBeeT, Sk-Perm, skDragon, skLib, skQuery, skRayFall, Skuniversal, SkVault, Tablisknu and TuSKe
 
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.
 
Status
Not open for further replies.