It still doesn't work :/Try setting a local variable to the player variable as a string, parsing it as a player and than use the damage effect on that
code_language.skript:
command /debug:
trigger:
set {ActualVote} to player
set {ActualVote}'s max health to 10
set {_health} to {ActualVote}'s health / 2
set {_player} to {ActualVote}
damage {_player} by {_health} hearts
send "&aDebug: %{ActualVote}% - %{_health}%"
I also tried set {_player} to {ActualVote} parsed as a offline player