I'm trying to add attributes with functions but i get and error every time on line 16 17 18 and 19
function applyAttributes(p: player):
if {hearts::%{_p}%} is not set:
set {hearts::%{_p}%} to 20
if {speed::%{_p}%} is not set:
set {speed::%{_p}%} to 1
if {damage::%{_p}%} is not set:
set {damage::%{_p}%} to 1
if {luck::%{_p}%} is not set:
set {luck::%{_p}%} to 0
if {armour::%{_p}%} is not set:
set {armour::%{_p}%} to 0
if {size::%{_p}%} is not set:
set {size::%{_p}%} to 1
set max health of {_p} to {hearts::%{_p}%}
set walk speed of {_p} to 0.2 * {speed::%{_p}%}
set attribute generic attack damage of {_p} to {damage::%{_p}%}
set attribute generic luck of {_p} to {luck::%{_p}%}
set attribute generic armor of {_p} to {armour::%{_p}%}
set attribute generic scale of {_p} to {size::%{_p}%}