#SET - Error output for Addif the ObjectName variable is empty

#UNIT - Return zero is SpeedMax is nil
This commit is contained in:
Applevangelist
2025-02-19 17:32:25 +01:00
parent 749c5f87de
commit 43eeaede65
2 changed files with 9 additions and 2 deletions

View File

@@ -289,7 +289,14 @@ do -- SET_BASE
-- Debug info.
--self:T2( { ObjectName = ObjectName, Object = Object } )
-- Error ahndling
if not ObjectName or ObjectName == "" then
self:E("SET_BASE:Add - Invalid ObjectName handed")
self:E({ObjectName=ObjectName, Object=Object})
return self
end
-- Ensure that the existing element is removed from the Set before a new one is inserted to the Set
if self.Set[ObjectName] then
self:Remove( ObjectName, true )