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.

Custom error message if player argument is offline not working

Discussion in 'Skript' started by Trueno, May 11, 2017.

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

    Trueno Member

    Joined:
    May 6, 2017
    Messages:
    4
    Likes Received:
    0
    Skript Version: Skript 2.2 (dev27)
    Skript Author: Bensku
    Minecraft Version: 1.11

    Addons using (including versions):
    Umbaska-3-3,SkQuery-Lime 1.11,skRayFall_v1.9.7

    Troubleshooting:
    Im trying to send a custom error message to the command sender when the argument is an offline player, but it still say the default erorr message that i think from the Skript, if i remember correctly it says like this "Theres no online player such as ..."

    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? I have tried using
    Code (Skript):
    1. if player is offline
    or something like this
    Code (Skript):
    1. set {_p} to "%arg%" parsed as offline player
    2.         if {_p} is offline:
    3.             message "OFFLINE"
    4.             stop
    (i got this line from Cern.sk)

    it still the same, ty anyway
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,185
    Likes Received:
    216
    You need to put %arg-1% or %arg-2% etc.

    Send please your error code
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,185
    Likes Received:
    216
    Uhm, why offline? Use online instead offline then use else. I have no plan what you doing with offline.
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,185
    Likes Received:
    216
    oh yeah that is working thank you, but when i try to use space in the argument it still say the same default error message (pic in bottom).. not the the custom even tho i alr put something like this
    Code (Skript):
    1. command /test <offlineplayer>
    2. trigger:
    3. if arg contains " ":
    4. message "A"
    arg-1 doesnt work, i actually dont have error code im just asking how to set a custom error message when someone type an offline player in the command argument.
    this is the default error message when u type an offline player in command
    [​IMG]

    thiis is what i want
    [​IMG]





    EDIT:
    i manage to solve it by changing the command argument to <text> and adding this
    Code (Skript):
    1. set {_P} to arg parsed as offlineplayer
    ty for the help anyway guys
    [​IMG]
     
    #4 ShaneBee, May 12, 2017
    Last edited by a moderator: May 12, 2017
Thread Status:
Not open for further replies.

Share This Page

Loading...