Can't Compare a slot with 'named "Warden Sword"'

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

W00lyP4rr0t2

New Member
Feb 19, 2024
6
0
1
idk why this happens but here's the code please help
on damage:
if attacker's tool is named "Warden Sword":
chance of 10%:
execute console command 9 "%victim%" 5 minecraft:generic_kill by "%attacker%"
 
Your issue is on the second line you posted. It should be:
Code:
if name of attacker's tool is "Example":
Another example of this: Here (Sorry, couldn't find an exact copy of it in the Docs. The general format of the expression is something you can refer to on line #86 of this Skript, notice how 'name' comes first)
Also, I mentioned this minor issue in another post but as you code with Skript, always try to avoid 'execute console command' because especially for code when you applying an effect to a player, it can be confusing for future reference and could be shorter. I'm not going to provide an exact solution to this issue directly but I will link an expression in the Docs that you can use to replace your 'execute console command' with (Here).