Sv Construct

From the Fallout3 GECK Wiki
Revision as of 09:24, 28 July 2014 by imported>Odessa
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Returns a string variable constructed from the specified string and up to 20 formatting arguments.

If no formatting is required, this function is not necessary, as the Let command can be used to assign string variables. Note that Let supports concatanation and the ToString($) function which can usually achieve the same result as formatting.

Syntax

[help]
(string_var) Sv_Construct Literal:string Formatting

Example

string_var my_string
int iValue
ref rActor

; Used to construct a formatted string:

let my_string := Sv_Construct "iValue equals %g and rActor's name is %n", iValue, rActor

Typically you can skip Sv_Construct and use concatanation with ToString($) instead of formatting, if you prefer:

let my_string := "iValue equals " + $iValue + " and rActor's name is " + $rActor

See Also