An error appears in the Hardwood Skript.

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

AnKi

Member
Jan 5, 2024
1
0
1
- 오류 텍스트
[19:03:10 INFO]: Can't understand this condition: 'file "plugins/Skript/scripts/%player's uuid%.yaml" doesn't exist'
[19:03:09 INFO]: "plugins/Skript/scripts/%the UUID of {_target}%.yaml" is neither an item stack, an item type nor an entity type

This is a part of the code that occurs in the function of saving or updating the call information of the person who first connects to the server.
What should I do to resolve this error?

- Skript code
Code:
options:
    prefix: &f&l[&c&l!&f&l] &8:: &f
variables:
    start.money = 500
on join:
    if file "plugins/Skript/scripts/%player's uuid%.yaml" doesn't exist:
        create file "plugins/Skript/scripts/%player's uuid%.yml"
        set {_dir} to "plugins/Skript/scripts/%player's uuid%.yaml"
        set yaml value "UserData.Name" from {_dir} to "%player%"
        set yaml value "UserData.UUID" from {_dir} to player's uuid
        set yaml value "UserData.Money" from {_dir} to {start.money}

function getMoney(target: player) :: number:
    if file existence of "plugins/Skript/scripts/%{_target}'s uuid%.yaml" is true:
        set {_dir} to "plugins/Skript/scripts/%{_target}'s uuid%.yaml"
        set {_money} to yaml value "UserData.Money" from {_dir}
        return {_money} parsed as number
function setMoney(target: player, value: text):
    if file existence of "plugins/Skript/scripts/%{_target}'s uuid%.yaml" is true:
        set {_dir} to "plugins/Skript/scripts/%{_target}'s uuid%.yaml"
        if "%{_value}%" contains uncolored "+":
            replace all "+" with "" in {_value}
            set yaml value "UserData.Money" from {_dir} to getMoney(target) + {_value} parsed as number
        else if "%{_value}%" contains uncolored "-":
            replace all "-" with "" in {_value}
            set yaml value "UserData.Money" from {_dir} to getMoney(target) - {_value} parsed as number
        else:
            set yaml value "UserData.Money" from {_dir} to {_value} parsed as number
 
Last edited: