Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

CountEx

Searching for items with type ObjType and color *** Color*** in container Container and returning FindFullQuantity.

NB: This method doesn’t search in subcontainers

Pascal

function CountEx(ObjType : Word; Color : Word; Container : Cardinal) : Integer;

Python

def CountEx(ObjType, Color, Container) -> Integer

Example Pascal

procedure CheckOpened(Container: Cardinal);
begin
  if ((not Dead) and (CountEx(-1, -1, Container) <= 0)) then 
    UseObject(Container);
end;

end.```