Custom error message if player argument is offline not working

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

Trueno

Member
May 6, 2017
4
0
0
28
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_language.skript:
if player is offline
or something like this
code_language.skript:
set {_p} to "%arg%" parsed as offline player
        if {_p} is offline:
            message "OFFLINE"
            stop
(i got this line from Cern.sk)

it still the same, ty anyway
 
Uhm, why offline? Use online instead offline then use else. I have no plan what you doing with offline.

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_language.skript:
command /test <offlineplayer>
trigger:
if arg contains " ":
message "A"

You need to put %arg-1% or %arg-2% etc.

Send please your error code

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
4cadc786f0ed4aada4c3528d567c026f.png


thiis is what i want
1a658a5d2d0642558d2081fc78327529.png






EDIT:
i manage to solve it by changing the command argument to <text> and adding this
code_language.skript:
set {_P} to arg parsed as offlineplayer
ty for the help anyway guys
9b5acf21cee54cffb2c476f126e7509e.png
 
Last edited by a moderator:
Status
Not open for further replies.