ToNumber

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

Converts a string that contains a number, to a number. You can use '#' as shorthand alias.

Syntax

[help]
(float) ToNumber ToConvert:string hexidecimal:bool

Example

int iNum
string_var MyString
let MyString := "1969"
let iNum := #MyString ; 1969
float fNum
let MyString := "3.14"
let fNum := #MyString ; 3.14

let MyString := "00000ADD"
let iNum := ToNumber MyString, 1 ; 2781

See Also