The author of the code below explicitly returns True
and False
in separate code paths for a boolean function.
Bool Function IsItemAvailable(ObjectReference akItem)
If akItem.Is3DLoaded() && !akItem.IsDisabled() && !akItem.IsDeleted() && !akItem.IsDestroyed() && !akItem.IsActivationBlocked()
Return True
EndIf
Return False
EndFunction
To avoid debugging multiple code paths, simplify the function.
Bool Function IsItemAvailable(ObjectReference akItem)
Return akItem.Is3DLoaded() && !akItem.IsDisabled() && !akItem.IsDeleted() && !akItem.IsDestroyed() && !akItem.IsActivationBlocked()
EndFunction