UniqueTID: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(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...")
 
No edit summary
 
Line 8: Line 8:


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.
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.
|id=-46}}
|id=-46
|seealso=
*[[IsTIDUsed]]}}

Latest revision as of 06:19, 10 May 2026

Description[edit]

This is an ACS built-in function.

Returns a free TID to apply to new things.

Usage[edit]

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

Parameters[edit]

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

Return value[edit]

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

Examples[edit]

No examples given.

Notes[edit]

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[edit]