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

ValueToString

(Difference between revisions)
Return to current revision
  1.  
    Retrieves the string representation of an [wiki]Actor value[/wiki].
    [h="2"] Declaration [/h]
  2. -
    <code cpp>
    VAULTSCRIPT std::string (*ValueToString)(vaultmp::Index);
  3. +
    [highlight=cpp]
    VAULTSCRIPT vaultmp::String (*ValueToString)(vaultmp::Index);
  4.  
    native ValueToString(index, value{});
  5. -
    </code>
  6. +
    [/highlight]
  7.  
    [h="2"] Parameters [/h]
    [b][wiki="Index"]vaultmp::Index[/wiki][/b] - the index of the [wiki]Actor value[/wiki]
    [b]value[/b] (PAWN only) - an array large enough to hold at least 64 characters
    [h="2"] Return value [/h]
  8. -
    The C++ version returns a std::string containing the string representation of the actor value. The PAWN version has no return value.
  9. +
    The C++ version returns a [wiki="String"]vaultmp::String[/wiki] containing the string representation of the actor value. The PAWN version has no return value.
  10.  
    [h="2"] Usage example (C++) [/h]
  11. -
    <code cpp>
    std::string value;
  12. +
    [highlight=cpp]
    vaultmp::String value;
  13.  
    value = ValueToString(index);
  14. -
    </code>
  15. +
    [/highlight]
  16.  
    [h="2"] Usage example (PAWN) [/h]
  17. -
    <code c>
  18. +
    [highlight=c]
  19.  
    new value{64};
    ValueToString(index, value);
  20. -
    </code>
  21. +
    [/highlight]
  22.  
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Misc functions[/category]