I'm new to creating yml files and I was trying things until I have been forced because I do not pass this part.
Could someone explain it to me and solve it?
Here is the code:
Could someone explain it to me and solve it?
Here is the code:
Code:
options:
prefix: &8[&5Coins&8]
file: plugins/Coins/data.yml
on load:
if file "{@file}" does not exist:
create file "{@file}"
function coins(player: player):
set {coins::%{_player}%} to skutil yaml value "Coins.players.%{_player}%" from file "{@file}"
while {coins::%{_player}%} is not set:
set skutil yaml value "Coins.players.%{_player}%" from file "{@file}" to 0
set {coins::%{_player}%} to skutil yaml value "Coins.players.%{_player}%" from file "{@file}"
command /coins [<text>]:
trigger:
if arg 1 is not set:
coins(player)
send "{@prefix} &fTus coins: &a%{coins::%{_player}%}%" to player
on mine:
set skutil yaml value "Coins.players.%{_player}%" from file "{@file}" to {coins::%{_player}%} + 1
coins(player)
on join:
coins(player)
on first join:
coins(player)