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 How to make a custom error message?

Discussion in 'Skript' started by Arownic, May 8, 2020.

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

    Arownic New Member

    Joined:
    May 8, 2020
    Messages:
    5
    Likes Received:
    0
    Currently trying to modify a StaffChat skript where when ever you did just /sc without text it give you a error message.
    Skript:

    options: scprefix:&8[&4StaffChat&8]&7
    command /sc [<text>]:
    trigger:
    if player has permission "is.staff":
    if arg-1 is set:
    if arg-1 is "toggle":
    if {sc.%player%} is "false":
    set {sc.%player%} to "true"
    send "{@scprefix} Staff chat enabled." to player
    if {sc.%player%} is "true":
    set {sc.%player%} to "false"
    send "{@scprefix} Staff chat disabled." to player
    else:
    loop all players:
    if loop-player has permission "is.staff":
    send "{@scprefix} &c%player's display name%&f: &f%arg-1%" to loop-players

    on chat:
    if {sc.%player%} is "true":
    loop all players:
    if loop-player has permission "is.staff":
    send "{@scprefix} &c%player's display name%&f: &f%message%"
     
  2. Best Answer:
    Post #2 by AROD2003, May 8, 2020
  3. AROD2003

    AROD2003 Member

    Joined:
    Feb 14, 2017
    Messages:
    29
    Likes Received:
    1
    if arg 1 is not set:
    message "error you didnt put the message"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...