aimodel.getFunctionName

Returns the name string of a function in an AIModel.

Prototype

  1. sName = aimodel.getFunctionName ( hAIModel, nIndex )

Description

Returns the name string of the function at a specified index in hAIModel.


Parameters

hAIModel - valid AIModel handle
nIndex - index 1..nFunctionsCount


Return values

sName - function name string


Sample

  1. -- sort functions by name
  2. local tSortedFunctions = { }
  3. for iIndex = 1, nFunctionsCount do
  4. table.insert ( tSortedFunctions, aimodel.getFunctionName ( hResource, iIndex ) )
  5. end
  6. table.sort ( tSortedFunctions )

Available since ShiVa 2.0