Solved Skript 2.2 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 community!

    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.

CormanYT

Active Member
Jan 6, 2018
122
5
18
Hi I'm using Skript 2.2 (dev32d) which is one of Bensku's forks. I am also using SkQuery-Lime.

code_language.skript:
command /mail [<text>] [<player>] [<text>]:
    permission: iBasics.mail
    permission message: {@no-permission-message}
    trigger:
        if arg 1 is "read":
            message "&6Your messages: &f%{iBasics::mail::%player's uuid%::*}%"
        if arg 1 is "clear":
            clear {iBasics::mail::%player's uuid%::*}
            message "&6Your mail has been cleared!"
        if arg 1 is "send":
            if arg 2 is set:
                if arg 3 is set:
                    add "&f[%player%] %argument 3%" to {iBasics::mail::player's uuid::*}

It won't work somehow, it's supposed to show me any recieved mail with /mail read, remove all mail messages with /mail clear, and send someone mail with /mail send.

The problem is with /mail read or /mail send, since they wont work.
 
Hi I'm using Skript 2.2 (dev32d) which is one of Bensku's forks. I am also using SkQuery-Lime.

code_language.skript:
command /mail [<text>] [<player>] [<text>]:
    permission: iBasics.mail
    permission message: {@no-permission-message}
    trigger:
        if arg 1 is "read":
            message "&6Your messages: &f%{iBasics::mail::%player's uuid%::*}%"
        if arg 1 is "clear":
            clear {iBasics::mail::%player's uuid%::*}
            message "&6Your mail has been cleared!"
        if arg 1 is "send":
            if arg 2 is set:
                if arg 3 is set:
                    add "&f[%player%] %argument 3%" to {iBasics::mail::player's uuid::*}

It won't work somehow, it's supposed to show me any recieved mail with /mail read, remove all mail messages with /mail clear, and send someone mail with /mail send.

The problem is with /mail read or /mail send, since they wont work.
in the send part you didnt put player's uuid in percents. and i think you would want arg-2's uuid?
 
Last edited:
Oh thanks! I'll try that out and edit this post if it works, and if it works I'll make your post the best answer!

EDIT by CormanYT: Thanks, changed the code to this.
code_language.skript:
command /mail [<text>] [<player>] [<text>]:
    permission: iBasics.mail
    permission message: {@no-permission-message}
    trigger:
        if arg 1 is "read":
            message "&6Your messages: &f%{iBasics::mail::%player's uuid%::*}%"
        if arg 1 is "clear":
            clear {iBasics::mail::%player's uuid%::*}
            message "&6Your mail has been cleared!"
        if arg 1 is "send":
            if arg 2 is set:
                if arg 3 is set:
                    add "&f[%player%] %argument 3%" to {iBasics::mail::%argument 2's uuid%::*}
It works even though it's not the correct format it does work, so thanks a lot you've helped me out :emoji_grinning:!
 
Status
Not open for further replies.