NeED HELP

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

jacksfbhbd

New Member
Sep 11, 2024
5
0
1
23
I have this skript but i keep getting these errors.


every 60 seconds in "world":
add 1 to {minute::%player%}

if {minute::%player%} = 60:
add 1 to {hour::%player%}
set {minute::%player%} to 0

if {hour::%player%} = 24:
add 1 to {days::%player%}
set {hour::%player%} to 0

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

command /stats:
aliases: stat, statistics, statistic
trigger:
send "&fKills: &4%{kills::%player%}%" to player
send "&fDeaths: &6%{deaths::%player%}%" to player
send "&fPlaytime: &e%{days::%player%}%d %{hour::%player%}%h" to player


also this is the errors i get
1726011382005.png
 
I have this skript but i keep getting these errors.


every 60 seconds in "world":
add 1 to {minute::%player%}

if {minute::%player%} = 60:
add 1 to {hour::%player%}
set {minute::%player%} to 0

if {hour::%player%} = 24:
add 1 to {days::%player%}
set {hour::%player%} to 0

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

command /stats:
aliases: stat, statistics, statistic
trigger:
send "&fKills: &4%{kills::%player%}%" to player
send "&fDeaths: &6%{deaths::%player%}%" to player
send "&fPlaytime: &e%{days::%player%}%d %{hour::%player%}%h" to player


also this is the errors i get
View attachment 8792
When using on death events in Skript, the only valid types of entities you can call is either victim or attacker, not player. Also, in the error for line two, since no players are mentioned/used, you cannot use 'player' there. To fix that: Simply loop all players and refer to loop-player. And finally, you have floating if events. They aren't attached to anything so they logically cannot run until you attach them to an event.
 
Code:
every 60 seconds in "world":
  Loop all players:
    add 1 to {minute::%loop-player%}
    if {minute::%loop-player%} = 60:
      add 1 to {hour::%loop-player%}
      set {minute::%loop-player%} to 0
    if {hour::%loop-player%} = 24:
      add 1 to {days::%loop-player%}
      set {hour::%loop-player%} to 0

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

command /stats:
  aliases: stat, statistics, statistic
  trigger:
    send "&fKills: &4%{kills::%player%}%" to player
    send "&fDeaths: &6%{deaths::%player%}%" to player
    send "&fPlaytime: &e%{days::%player%}%d %{hour::%player%}%h" to player