Jump to content

GetNewMarkerID: Difference between revisions

From CMM Wiki
m GetNewMarkerID – created via PowerShell script (2026-01-01T06:03:16Z)
Tags: Manual revert Reverted
m GetNewMarkerID – created via PowerShell script (2026-01-01T06:03:34Z)
Tags: Manual revert Reverted
Line 1: Line 1:
{{Template:FunctionInfo|fName=          GetNewMarkerID|fDescription=  Generates a new unused marker ID by checking against existing allocated IDs and returning the first available one, with a fallback to -1 if no ID can be found after extensive retries.|parentFile=    cmm.markerFunctions.lua|syntax=        CMM.GetNewMarkerID()|return=        number|returnDesc=    A new unused marker ID that has not been allocated in the MarkerPanels table, or -1 if no valid ID could be found.|example=        CMM.GetNewMarkerID()|exampleDesc=    Returns a unique marker ID such as 205, which has not been previously used in the mission, ensuring no conflicts with existing markers.|related=        |note=          |envType= CMM}}
{{Template:FunctionInfo|fName=          GetNewMarkerID|fDescription=  Generates a unique convoy group name by incrementing a counter until a name not already in use is found, ensuring no name conflicts with existing groups.|parentFile=    cmm.spawnFunctions.lua|syntax=        CMM.GetNewMarkerID()|return=        string|returnDesc=    Returns a new available convoy group name in the format "Convoy#XXXX" where XXXX is a zero-padded number, or "NO-NEW-CONVOY-NAME" if no unique name can be found after maximum retries.|example=        CMM.GetNewMarkerID()|exampleDesc=    Invokes the function to generate a unique convoy name, such as "Convoy#0001", ensuring it does not conflict with existing group names in the mission.|related=        |note=          --TODO CODE REVIEW REQUIRED|envType= CMM}}

Revision as of 19:03, 31 December 2025

Return to CMM Command Reference
Environment: Mission Scripting
Function: GetNewMarkerID
Function Description: Generates a unique convoy group name by incrementing a counter until a name not already in use is found, ensuring no name conflicts with existing groups.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.GetNewMarkerID( )
Return Value: string
Parameters: Name Description
Example: CMM.GetNewMarkerID()
Example Description: Invokes the function to generate a unique convoy name, such as "Convoy#0001", ensuring it does not conflict with existing group names in the mission.
Related Functions:
Notes: --TODO CODE REVIEW REQUIRED