Script Version (do not put latest): 2.6.1
Script Author: TPGamesNL
Minecraft Version: 1.18.2
I am making a linear interpolation formula for a custom health skript. I need to know how to make this work
Console error:
§c Can't understand this condition/effect: set {_result} to ((%{_v}% - 0)(10-0)) / (%{vidamaxima::%{_p}%}% - %{vida::%{_p}%}%)
§6 Line: §7set {_result} to ((%{_v}% - 0)(10-0)) / (%{vidamaxima::%{_p}%}% - %{vida::%{_p}%}%)
§r
Code
Script Author: TPGamesNL
Minecraft Version: 1.18.2
I am making a linear interpolation formula for a custom health skript. I need to know how to make this work
Console error:
§c Can't understand this condition/effect: set {_result} to ((%{_v}% - 0)(10-0)) / (%{vidamaxima::%{_p}%}% - %{vida::%{_p}%}%)
§6 Line: §7set {_result} to ((%{_v}% - 0)(10-0)) / (%{vidamaxima::%{_p}%}% - %{vida::%{_p}%}%)
§r
Code
Code:
function vidaI(v: number, p: player) :: number:
set {_result} to ((%{_v}% - 0)(10-0)) / (%{vidamaxima::%{_p}%}% - %{vida::%{_p}%}%)
return {_result}
on heal:
set {_vida} to health of player
set {_nuevavida} to vidaI({_vida}, player)
set {vida::%player%} to {_nuevavida}