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 Cant understand this condition

Discussion in 'Skript' started by LazerYK, Aug 4, 2021.

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

    LazerYK New Member

    Joined:
    Aug 3, 2021
    Messages:
    6
    Likes Received:
    0
    on rightclick on entity:
    if name of entity is "&3L":
    if {%player%.Lclick} = false
    set {%player%.Lclick} to true

    if {%player%.L} = 0:
    message "&3L: &7Hej Person! Du må være ny her i byen. (1/3)" to player
    set {%player%.jim} to 1
    play sound "entity.villager.trade" woth volume 1 and pitch 1 to player


    there is 2 errors in line 8 and 3 it says cant understand this condition im not the best and its prob why there is errors
     
    #1 LazerYK, Aug 4, 2021
    Last edited: Aug 4, 2021
  2. Best Answer:
    Post #2 by TheCubPlays, Aug 4, 2021
  3. TheCubPlays

    TheCubPlays Member

    Joined:
    Jun 22, 2021
    Messages:
    42
    Likes Received:
    3
    I recommend using "::" instead of "." for variables but however the only thing that is wrong here is the fact that you forgot to type a ":" at the end of the 3rd line and that you misspelled "with" on line 9, I tested that and it works so if it still doesn't work for you not sure what's wrong maybe try to see if you have the required skript version / plugins installed. So maybe try this?:
    Code (Text):
    1. on rightclick on entity:
    2.     if name of entity is "&3L":
    3.         if {%player%::Lclick} = false:
    4.             set {%player%::Lclick} to true
    5.  
    6.     if {%player%::L} = 0:
    7.         message "&3L: &7Hej Person! Du må være ny her i byen. (1/3)" to player
    8.         set {%player%::jim} to 1
    9.         play sound "entity.villager.trade" with volume 1 and pitch 1 to player
     
  4. LazerYK

    LazerYK New Member

    Joined:
    Aug 3, 2021
    Messages:
    6
    Likes Received:
    0
    oof my bad but thank you alot
     
  5. TheCubPlays

    TheCubPlays Member

    Joined:
    Jun 22, 2021
    Messages:
    42
    Likes Received:
    3
    No problem, don't forget to mark this as solved.
     
  6. LazerYK

    LazerYK New Member

    Joined:
    Aug 3, 2021
    Messages:
    6
    Likes Received:
    0
    I dont remember how to mark as solved but ill figer it out and the part With the sound it still dont work but I prob just need a New version of skunity
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    40
    marked as solved
     
  8. LazerYK

    LazerYK New Member

    Joined:
    Aug 3, 2021
    Messages:
    6
    Likes Received:
    0
    Thank you so much
     
Thread Status:
Not open for further replies.

Share This Page

Loading...