Solved error on victim is a player

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Drakem

Member
Apr 29, 2022
10
0
1
31
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
 
1. Use code formation
2. Use list variables
3. The error given is literally your solution -> Use 'attacker' and/or 'victim' in damage events

I used "victim is a player" that is the victim, or isn't it?? could you please explain me? :emoji_slight_smile:
 
Code:
if {%player%.jump} is equal to true:
->
Code:
if {%victim%::jump} is true:

Changed it to list variables, corrected the error and removed "equal to"
 
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
 
Status
Not open for further replies.