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.

Click on the block in the region

Discussion in 'Skript' started by L0mchansky, Mar 12, 2018.

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

    L0mchansky Member

    Joined:
    Mar 5, 2018
    Messages:
    1
    Likes Received:
    0
    Good afternoon, my friend! I have a problem. I need that when I click on any block in the region, the value of the variable changes.

    Code (Skript):
    1. on rightclick:
    2.     loop all blocks in region{Ogorod}:
    3. # PROBLEM LINE
    4.         if {Proverka} = 0:
    5.             set {Proverka} to 1
    6.             if {Speed_Attack} = 1:
    7.                 subtract {Damagel} from {Heal}
    8.                 wait 1 seconds
    9.                 set {Proverka} to 0
    And also, do not tell what color scheme do you use to highlight the code?
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,015
    Likes Received:
    62
    I don't see where you are setting {Proverka} in the first place so that may be the problem. Your if statement will not trigger if {Proverka} has no value at all
    Code (Skript):
    1. if {Proverka} is not set:
    2.     set {Proverka} to 0
    If that's not the issue, could you explain what's not working a little more?
     
  3. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    you forgot a space
     
Thread Status:
Not open for further replies.

Share This Page

Loading...