Hey guys,
I got 2 pieces of code, but they are both in a different skript file:
Now, the first code is working fine.
But the second code is saying:
The expression 'argument' can only be used within a command.
Yes, i could add the 2th code to the first code, but that would mean that i need to Tab everything, and it is a skript file of over 1000 lines...
So how can i detect the arg-1 from the /deathnote command in a On Command ?
Because this will help me a lot.
I got 2 pieces of code, but they are both in a different skript file:
code_language.skript:
command /deathnote <text>:
trigger:
if arg-1 is not set:
send "&a/deathnote <Player>"
else if {%arg-1%.peacekeeper} is true:
send "&aYou can not deathnote the peacekeeper!" to player
stop
else:
if player is holding a enchanted book named "&cDeathnote" with lore "&7Command: /deathnote <player>":
loop all players:
if arg-1 is player:
message "&aYou can not kill yourself!"
stop
else if "%loop-value%" is arg-1:
if arg-1 parsed as a player's gamemode is not creative:
kill arg-1 parsed as a player
remove 1 enchanted book named "&cDeathnote" with lore "&7Command: /deathnote <player>" from the player
broadcast "&c&l%player% killed %arg-1%!"
else:
message "&cPls don't kill creative ppl :c"
code_language.skript:
on command "/deathnote":
if {%arg-1%.death} is true:
cancel event
send "&c%arg-1% is already dead!" to player
Now, the first code is working fine.
But the second code is saying:
The expression 'argument' can only be used within a command.
Yes, i could add the 2th code to the first code, but that would mean that i need to Tab everything, and it is a skript file of over 1000 lines...
So how can i detect the arg-1 from the /deathnote command in a On Command ?
Because this will help me a lot.
Last edited: