- 오류 텍스트
[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
[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: