Sv ToNumeric

< [[::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

(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