Solved on death: attacker/victim

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

    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!

JuliHatSpaB

Member
Aug 18, 2023
47
1
8
I'm using an 'on death:' event but I get an error when I'm trying to use attacker or victim:

on death:
if victim is player:
if attacker is player:
add 1 to {kills::%attacker%}

And I get this Error:
1696916952713.png

What am I doing wrong..?
 
Last edited:
As of skript 2.7 a change in comparison caused poor conditions like if %entity% is %entity% in damage/death events to no longer act like if %entity% is %entity type%
The proper and correct condition is if attacker is a pig and if victim is a player. The usage of "a" or "an" forces an entity type comparison