code_language.skript:
function vida(p: player):
open chest with 1 rows named "&4Vida" to the {_p}
format slot 1 of the {_p} with a wool named "Subir Vida" with lore "&asube +20||&9%{vidacosto.%{_p}%}%" to run [vida1(player)]
function vida1(p: player):
if {dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%:
subtract %{vidacosto.%{_p}%}% form the player
add 1000 to {vidacosto.%{_p}%}
add 20 to {vida.%{_p}%}
else:
send "&cNo tienes suficiente dinero" to {_p}
wait 2 second
send "&9Tu dinero %{dinero.%{_p}%}%" to {_p}
[21:20:54 ERROR]: There's no player in a function event (funtions.sk, line 12: format slot 1 of the player with a wool named "Subir Vida" with lore "&asube +20||&9%{vidacosto.%{_p}%}%" to run [vida1(player)]')
[21:20:54 ERROR]: can't understand this condition: '{dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%' (funtions.sk, line 14: if {dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%:')
[21:20:54 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (funtions.sk, line 18: else:')
[21:20:54 INFO]: [Skript] Encountered 4 errors while reloading funtions.sk!
[21:20:54 ERROR]: can't understand this condition: '{dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%' (funtions.sk, line 14: if {dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%:')
[21:20:54 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (funtions.sk, line 18: else:')
[21:20:54 INFO]: [Skript] Encountered 4 errors while reloading funtions.sk!