From a81abe7ae5dd47d3e613aaf79f3f21269bacf7e0 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Fri, 27 Oct 2023 19:51:42 -0300 Subject: [PATCH] fix nan hp --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3e8ba40..088d592 100644 --- a/init.lua +++ b/init.lua @@ -107,7 +107,7 @@ end function airutils.setText(self, vehicle_name) local properties = self.object:get_properties() local formatted = "" - if type( self.hp_max ) != "number" then self.hp_max = 0.1 end --strange error when hpmax is NaN + if type(self.hp_max) ~= "number" then self.hp_max = 0.1 end --strange error when hpmax is NaN if self.hp_max then formatted = " Current hp: " .. string.format( "%.2f", self.hp_max