(Difference between revisions)
Return to current revision
-
-
Retrieves the string representation of an [[Actor value]].
== Declaration ==
<code cpp>
VAULTSCRIPT std::string (*ValueToString)(vaultmp::Index);
-
+
Retrieves the string representation of an [wiki]Actor value[/wiki].
[h="2"] Declaration [/h]
[highlight=cpp]
VAULTSCRIPT VAULTSPACE cRawString (*VAULTAPI(ValueToString))(VAULTSPACE Index) _CPP(noexcept);
[/highlight]
[highlight=c]
-
native ValueToString(index, value{});
-
-
</code>
== Parameters ==
'''[[Index|vaultmp::Index]]''' - the index of the [[Actor value]]
'''value''' (PAWN only) - an array large enough to hold at least 64 characters
== Return value ==
The C++ version returns a std::string containing the string representation of the actor value. The PAWN version has no return value.
== Usage example (C++) ==
<code cpp>
std::string value;
value = ValueToString(index);
</code>
== Usage example (PAWN) ==
<code c>
new value{64};
ValueToString(index, value);
</code>
-
+
[/highlight]
[h="2"] Parameters [/h]
[b][wiki="Index"]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]
The C version returns a [wiki="cRawString"]cRawString[/wiki] containing the string representation of the actor value. The PAWN version has no return value.
[category]VaultMP interface[/category]
[category]Scripting functions[/category]
[category]Misc functions[/category]