GetGumpsCount
Returns the number of active gumps for the current character.
Returns 0 if the character is disconnected or there are no gumps.
Typically used as GetGumpsCount - 1 to reference the last (newest) gump in the list.
Возвращает количество активных гампов текущего персонажа.
Возвращает 0, если персонаж не подключён или гампов нет.
Обычно используется как GetGumpsCount - 1 для обращения к последнему (новейшему) гампу в списке.
function GetGumpsCount: Cardinal;
def GetGumpsCount() -> int: ...
begin
if GetGumpsCount > 0 then
if IsGumpCanBeClosed(GetGumpsCount - 1) then
CloseSimpleGump(GetGumpsCount - 1);
end.
if GetGumpsCount() > 0:
if IsGumpCanBeClosed(GetGumpsCount() - 1):
CloseSimpleGump(GetGumpsCount() - 1)