I'm not exactly sure what's wrong but I'm making abilities for fun and i've made an ability that makes a pillar of fire with particles and damages any player around them, but it decreases with how far they're away.
My problem is that i'm trying to make it not ignore a player's armor
I've done some troubleshooting and I believe my problem is that it's not getting the armor value of the entity it's trying to damage, so it's not reducing the final dmg at all.
if player has strength:
set {_dmg} to 5
loop 6 times:
set {_shape} to a helix of radius {_rad} and height 10
draw an animation of the shape {_shape} at player over 20 ticks
set {_rad} to {_rad} + 1
set {_neg} to {_dmg} * 0.10
set {_dmg} to {_dmg} - {_neg}
loop all entities in radius {_rad} around player:
if loop-entity is not player:
set {_armor} to loop-entity's armor attribute
set {_calc} to 1 - ({_armor} * 0.04)
set {_finaldmg} to {_dmg} * {_calc}
damage loop-entity by {_finaldmg}
ignite loop-entity for 6 seconds
send "&2ENTTIY: %loop-entity's name%" to player
send "&fORIGINAL: %{_dmg}%" to player
send "&eFINAL: %{_finaldmg}%" to player
send "&7ARMOR: %{_armor}%"
send " " to player
send "&f%{_dmg}% &a* &6%{_calc}% &a= &e%{_finaldmg}%" to player```
The screenshot is something i made send in my chat to test dmg values, if it helps any, but as you see the armor value is 0 for some reason.