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 error on victim is a player

Discussion in 'Skript' started by Drakem, Apr 30, 2022.

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

    Drakem Member

    Joined:
    Apr 29, 2022
    Messages:
    10
    Likes Received:
    0
    I'm trying to make a double jump script, and I want it to have a few seconds of immunity when it drops. I used a boolean variable that will be deactivated a few seconds after the jump, but it gives me an error

    on damage:
    victim is player
    damage was caused by fall
    if {%player%.jump} is equal to true:
    cancel event

    Console error:

    [ERROR]: Use 'attacker' and/or 'victim' in damage events (drakem.sk, line 22: if {%player%.jump} is equal to true:')

    I guess I'm writing in the wrong order, can someone help me? pls

     
  2. Best Answer:
    Post #5 by JakeTheChad, May 1, 2022
  3. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    1. Use code formation
    2. Use list variables
    3. The error given is literally your solution -> Use 'attacker' and/or 'victim' in damage events
     
  4. Drakem

    Drakem Member

    Joined:
    Apr 29, 2022
    Messages:
    10
    Likes Received:
    0
    I used "victim is a player" that is the victim, or isn't it?? could you please explain me? :emoji_slight_smile:
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Code (Text):
    1. if {%player%.jump} is equal to true:
    ->
    Code (Text):
    1. if {%victim%::jump} is true:
    Changed it to list variables, corrected the error and removed "equal to"
     
  6. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    77
    Likes Received:
    5
    also {jump::%victim%} is better, skript just has to store data in a list instead of making a list for every player for 1 value
     
    • Friendly Friendly x 1
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    oh right!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...