Sv ToNumeric

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Attempts to convert the contents of a string variable to a number. Valid characters include digits, a leading sign, and an 'e' to indicate scientific notation. Conversion halts at the first invalid character. Added by NVSE 4.1.

Syntax

[help]
(float) Sv_ToNumeric ToConvert:string_var

Example

string_var my_string
float MyFloat

let my_string := "-55"

let MyFloat := sv_ToNumeric my_string ; * -55.0

See Also