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 Can't understand condition/effect

Discussion in 'Skript' started by SuperEpps22556, Jun 26, 2018.

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

    Joined:
    Oct 3, 2017
    Messages:
    15
    Likes Received:
    2
    To start off, I am not too advanced in doing a lot of big skripting but I've been trying to practice them. I've been trying to make a perk skript with this code:

    Code (Skript):
    1. on damage of a player:
    2.     if attacker is a player:
    3.         if {ragemeter:%attacker%} is 1
    4.             if {rage:%attacker%} is 1:
    5.                 apply strength 3 to the attacker for 3 seconds
    6.                 set {ragemeter:%attacker%} to 0
    7.                 wait 5 seconds
    8.                 set {ragemeter:%attacker%} to 1
    9.         if {ragemeter:%attacker%} is 0
    10.         stop
    I tried to base it off of a previous one I made which worked:
    Code (Skript):
    1. on damage of a player:
    2.     if attacker is a player:
    3.         if {poison:%attacker%} is 1:
    4.             apply poison 1 to the victim for 10 seconds
    However, I get indentation errors and the skript cannot understand the condition/effect {ragemeter:%attacker%}


    I have Skript, SKQuery, and skRayFall
     
    • Like Like x 1
  2. _JustDylan_

    Supporter

    Joined:
    Apr 20, 2018
    Messages:
    36
    Likes Received:
    4
    Code (Skript):
    1. on damage of a player:
    2.     if attacker is a player:
    3.         if {ragemeter:%attacker%} is 1
    4.             if {rage:%attacker%} is 1:
    5.                 apply strength 3 to the attacker for 3 seconds
    6.                 set {ragemeter:%attacker%} to 0
    7.                 wait 5 seconds
    8.                 set {ragemeter:%attacker%} to 1
    9.         #this part is useless
    10.         if {ragemeter:%attacker%} is 0
    11.         stop
    12. #if you wanted to indent it right it should be like this
    13. #        if {ragemeter:%attacker%} is 0
    14. #                stop
     
  3. SuperEpps22556

    Joined:
    Oct 3, 2017
    Messages:
    15
    Likes Received:
    2
    The indentation wasn't the error I wanted to fix, it was the skript not understanding the "{rage:%attacker%} is 1:"
     
  4. _JustDylan_

    Supporter

    Joined:
    Apr 20, 2018
    Messages:
    36
    Likes Received:
    4
    Code (Skript):
    1. on damage of a player:
    2.     if attacker is a player:
    3.         if {ragemeter:%attacker%} is 1:
    4.             if {rage:%attacker%} is 1:
    5.                 apply strength 3 to the attacker for 3 seconds
    6.                 set {ragemeter:%attacker%} to 0
    7.                 wait 5 seconds
    8.                 set {ragemeter:%attacker%} to 1
    you forgot to add : after some conditions, this should work.
     
  5. SuperEpps22556

    Joined:
    Oct 3, 2017
    Messages:
    15
    Likes Received:
    2
    Thank you, I don't see how I missed that. Much appreciated
     
Thread Status:
Not open for further replies.

Share This Page

Loading...