UniqueTID

From Eternity Wiki
Revision as of 03:11, 10 May 2026 by Printz (talk | contribs) (Created page with "{{ACSFunction|description=Returns a free TID to apply to new things. |usage=''int'' '''UniqueTID'''([''int start''[, ''int limit'']])} |parameters= *''start'': optional start TID to count from *''limit'': optional limit of retries |return=New free TID to use, or 0 if it couldn't find one within limit. |notes=If ''start'' is not provided, it will start by trying a random TID. If attempted TID is currently in use, it will increment by up to ''limit'' tries, or keep lo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

This is an ACS built-in function.

Returns a free TID to apply to new things.

Usage

int UniqueTID([int start[, int limit]])}

Parameters

  • start: optional start TID to count from
  • limit: optional limit of retries

Return value

New free TID to use, or 0 if it couldn't find one within limit.

Examples

No examples given.

Notes

If start is not provided, it will start by trying a random TID.

If attempted TID is currently in use, it will increment by up to limit tries, or keep looking if no limit. There's a limit of 32767 TIDs.

This function's identification in zspecial.acs is: -46.

See also