Solved Skript says unknown command

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

Sam1370

Member
Jun 11, 2017
17
1
0
47
So I try to make a command, right? And then I do! And then Skript says that it's an unknown command at the same time while returning how you do it.
This is what it says:
code_language.skript:
20.06 11:40:48 [Server] INFO Correct usage: /trs30minutes <player>
20.06 11:40:48 [Server] INFO Unknown command. Type "/help" for help.
Doesn't make any sense.
I have the latest skript version (bensku) and addons Skellett, SkQuery-Lime, and TuSKe.
Here's my code.
code_language.skript:
command /trsvote <player>:
    trigger:
        player has permission "thatrandomserver.vote":
            if arg 1 has permission "thatrandomserver.mvp":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, &bMVP! &aHere are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 20
                message "&b+ 20 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 550 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 550"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 550 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 550"
            if arg 1 has permission "thatrandomserver.vip":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, VIP! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 10
                message "&b+ 10 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 400 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 400"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 400 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 400"
            else:
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 5
                message "&b+ 5 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 200 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 200"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 200 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 200"
command /trsdailylogin <player>:
    trigger:
        player has permission "thatrandomserver.dailylogin":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou logged in for the first time today, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
            if arg 1 has permission "thatrandomserver.vip":
                message "&aYou logged in for the first time today, VIP! Here are your rewards!" to arg 1
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
            else:
                message "&aYou logged in for the first time today! Here are your rewards!" to arg 1
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
command /trs30minutes <player>:
    trigger:
        player has permission "thatrandomserver.30minutes":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou have played on the server for 30 minutes, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 20 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 20"
            if arg 1 has permission "thatrandomserver.vip":
                message "&aYou have played on the server for 30 minutes, VIP! Here are your rewards!" to arg 1
                message "&9+ 10 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 10"
            else:
                message "&aYou have played on the server for 30 minutes! Here are your rewards!" to arg 1
                message "&9+ 5 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 5"
Is there anything wrong with it?
EDIT: It works when executed from the player, but not from the console D:
 
Last edited:
code_language.skript:
command /trsvote [<player>]:
    trigger:
        sender has permission "thatrandomserver.vote":
            if arg 1 has permission "thatrandomserver.mvp":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, &bMVP! &aHere are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 20
                message "&b+ 20 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 550 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 550"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 550 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 550"
            else if arg 1 has permission "thatrandomserver.vip":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, VIP! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 10
                message "&b+ 10 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 400 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 400"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 400 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 400"
            else if player doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 5
                message "&b+ 5 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 200 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 200"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 200 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 200"
command /trsdailylogin [<player>]:
    trigger:
        sender has permission "thatrandomserver.dailylogin":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou logged in for the first time today, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
            else if arg 1 has permission "thatrandomserver.vip":
                message "&aYou logged in for the first time today, VIP! Here are your rewards!" to arg 1
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
            else if arg 1 doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                message "&aYou logged in for the first time today! Here are your rewards!" to arg 1
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
command /trs30minutes [<player>]:
    trigger:
        sender has permission "thatrandomserver.30minutes":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou have played on the server for 30 minutes, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 20 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 20"
            else if arg 1 has permission "thatrandomserver.vip":
                message "&aYou have played on the server for 30 minutes, VIP! Here are your rewards!" to arg 1
                message "&9+ 10 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 10"
            else if arg 1 doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                message "&aYou have played on the server for 30 minutes! Here are your rewards!" to arg 1
                message "&9+ 5 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 5"


Try using the above ^
 
Last edited by a moderator:
code_language.skript:
command /trsvote <player>:
    trigger:
        sender has permission "thatrandomserver.vote":
            if arg 1 has permission "thatrandomserver.mvp":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, &bMVP! &aHere are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 20
                message "&b+ 20 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 550 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 550"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 550 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 550"
            else if arg 1 has permission "thatrandomserver.vip":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server, VIP! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 10
                message "&b+ 10 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 400 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 400"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 400 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 400"
            else if player doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                play sound "BLOCK_NOTE_HAT" to arg 1 with volume 1 and pitch 2
                message "&aThank you for voting for the server! Here are your rewards!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                increase {diamonds.%arg 1%} by 5
                message "&b+ 5 Diamonds!" to arg 1
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&3+ 200 SkyWars coins!" to arg 1
                execute console command "sw coins Add %arg 1% 200"
                wait 0.5 seconds
                play sound "BLOCK_NOTE_PLING" to arg 1 with volume 1 and pitch 2
                message "&e+ 200 HideAndSeek coins!" to arg 1
                execute console command "has coins Add %arg 1% 200"
command /trsdailylogin <player>:
    trigger:
        sender has permission "thatrandomserver.dailylogin":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou logged in for the first time today, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 2 &aFive Star &eMystery Boxes!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 2 5"
            else if arg 1 has permission "thatrandomserver.vip":
                message "&aYou logged in for the first time today, VIP! Here are your rewards!" to arg 1
                message "&9+ 1 &aFive Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 5"
            else if arg 1 doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                message "&aYou logged in for the first time today! Here are your rewards!" to arg 1
                message "&9+ 1 &aThree Star &eMystery Box!" to arg 1
                execute console command "gmysteryboxes give %arg 1% 1 3"
command /trs30minutes <player>:
    trigger:
        sender has permission "thatrandomserver.30minutes":
            if arg 1 has permission "thatrandomserver.mvp":
                message "&aYou have played on the server for 30 minutes, &bMVP! &aHere are your rewards!" to arg 1
                message "&9+ 20 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 20"
            else if arg 1 has permission "thatrandomserver.vip":
                message "&aYou have played on the server for 30 minutes, VIP! Here are your rewards!" to arg 1
                message "&9+ 10 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 10"
            else if arg 1 doesn't have permission "thatrandomserver.mvp" or "thatrandomserver.vip":
                message "&aYou have played on the server for 30 minutes! Here are your rewards!" to arg 1
                message "&9+ 5 Mystery Dust!" to arg 1
                execute console command "mysterydust add %arg 1% 5"
Thanks :emoji_grinning: That worked.
 
Status
Not open for further replies.