code_language.skript:
# Function, that returns a colored percent.
function color(v: text) :: text:
{_v} <= 25:
return colored "&c%{_v}%"
else if {_v} <= 50:
return colored "&6%{_v}%"
else if {_v} <= 75:
return colored "&e%{_v}%"
else if {_v} <= 100:
return colored "&a%{_v}%"
command /bae:
trigger:
set {_percentCount} to 0
while {_percentCount} < 10:
add 1 to {_percentCount}
set {_percent} to ({_percentCount}*100) / 10
send actionbar from "%color({_percent})%" to player # Problem at this line, I see nothing in console.
wait 2 ticks