This site has been archived and made available for preservation purposes. No edits can be made.

GetList

(Difference between revisions)
Return to current revision
  1. -
    Returns a [wiki="IDVector"]IDVector[/wiki] of all instances of a given [wiki="Type"]vaultmp::Type[/wiki].
  2. +
    Returns a vector of all instances of a given [wiki="Type"]Type[/wiki].
  3.  
    [h="2"] Declaration [/h]
    [highlight=cpp]
  4. -
    VAULTSCRIPT vaultmp::IDVector (*GetList)(vaultmp::Type);
  5. +
    VAULTSCRIPT VAULTSPACE UCount (*VAULTAPI(GetList))(VAULTSPACE Type, VAULTSPACE RawArray(VAULTSPACE ID)*) VAULTCPP(noexcept);
    [/highlight]
    [highlight=cp]
  6.  
    native GetList(Type:type, id[]);
    [/highlight]
    [h="2"] Parameters [/h]
  7. -
    [b][wiki="Type"]vaultmp::Type[/wiki][/b] - the type
  8. +
    [b][wiki="Type"]Type[/wiki][/b] - the type
    [b]Pointer to [wiki="RawArray"]RawArray[/wiki] of [wiki]ID[/wiki][/b] - used to return a pointer to the resulting vector
  9.  
    [b]id[/b] (PAWN only) - an array large enough to hold all instances. See [wiki]GetCount[/wiki]
    [h="2"] Return value [/h]
  10. -
    The C++ version returns a [wiki="IDVector"]vaultmp::IDVector[/wiki]. The PAWN version returns the number of actually stored IDs.
  11. +
    Returns a [wiki="UCount"]UCount[/wiki], which is the number of instances in the vector.
  12.  
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Game functions[/category]