From ESOUI Wiki
This function returns a boolean indicating whether the player has a given number of empty bag slots in their inventory (BAG_BACKPACK). If the player does not have enough bag slots, this function also displays a warning notification indicating the number of additional bag slots they need to free up (i.e. if the player needs 100 bag slots and only has 75, they will be told to free up 25 slots).
- The number of empty bag slots needed.
if CheckInventorySpaceAndWarn(25) then -- -- the player has 25 empty bag slots free... -- end