HELP I NEED HELLPP

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

jacksfbhbd

New Member
Sep 11, 2024
9
0
1
Hi so I have this skript but it keeps getting these errors
Code:
function statsgui(p: player):
    set {_gui} to chest inventory with 3 rows named "GUI"

    set slot 10 of {_gui} to netherite sword named "&4Kills:" with lore "&4%{kills::%player%}%"
    set slot 11 of {_gui} to skeleton skull named "&6Deaths" with lore "&6%{deaths::%player%}%"
    set slot 15 of {_gui} to clock named "&ePlaytime:" with lore "&e%{days::%player%}%d %{hour::%player%}%h"
    set slot 16 of {_gui} to green candle named "&aMoney:" with lore "&aComing soon"
    open {_gui} to {_p}

on inventory click:
    name of event-inventory is "GUI"
    cancel event
    event-inventory is not player's inventory

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:
      statsgui(player)

I have these errors
1726088939356.png
 
Hi so I have this skript but it keeps getting these errors
Code:
function statsgui(p: player):
    set {_gui} to chest inventory with 3 rows named "GUI"

    set slot 10 of {_gui} to netherite sword named "&4Kills:" with lore "&4%{kills::%player%}%"
    set slot 11 of {_gui} to skeleton skull named "&6Deaths" with lore "&6%{deaths::%player%}%"
    set slot 15 of {_gui} to clock named "&ePlaytime:" with lore "&e%{days::%player%}%d %{hour::%player%}%h"
    set slot 16 of {_gui} to green candle named "&aMoney:" with lore "&aComing soon"
    open {_gui} to {_p}

on inventory click:
    name of event-inventory is "GUI"
    cancel event
    event-inventory is not player's inventory

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:
      statsgui(player)

I have these errorsView attachment 8793
Change player to {_p}. You cannot use 'player' in a function so in this case, {_p} is your player.
 
what do yoiu mean it doesn't make sense if you could do it for me thatwould be great becuase idont get it
sorry for english