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 If {variable} is not set: fail

Discussion in 'Skript' started by lordgamadon, Apr 15, 2020.

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

    lordgamadon New Member

    Joined:
    Apr 4, 2020
    Messages:
    8
    Likes Received:
    0
    so im having a fail with this so

    Code (Text):
    1.  
    2. If {Kills::%player%} is set to "<none>":
    3.    set {Kills::%player%} to "&cYOU DONT HAVE ANY"
    4. [CODE]
    5. it says
    6. cant understand this event
     
  2. krainser

    krainser Member

    Joined:
    Jan 27, 2017
    Messages:
    60
    Likes Received:
    3
    because "<none>" is not a string or text, is just a empty data outputed like a string, so you are comparing a string/text/whatever to nothing. the correct way to compare something that is not set is
    Code (Text):
    1. If {Kills::%player%} is not set":
    2.    set {Kills::%player%} to "&cYOU DONT HAVE ANY"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...