tonumber

From Garry's Mod
Jump to: navigation, search
 tonumber( )

Contents

Description

Attempts to convert the value to a number.

Returns nil on failure.

Arguments

any value

The value to convert. Can be a number or string.

Arguments

number base=10

The numeric base used in the string. Can be any integer between 2 and 36, inclusive.

Returns

number

The numeric representation of the value with the given base, or nil if the conversion failed.
Personal tools
Navigation