util.tobool

From Garry's Mod
Jump to: navigation, search
 util.tobool( )

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

You should use tobool instead.

Converts string or a number to a bool, if possible. Alias of tobool.

Arguments

any input

A string or a number to convert.

Returns

boolean

False if the input is equal to the string or boolean "false", if the input is equal to the string or number "0", or if the input is nil. Returns true otherwise.
Personal tools
Navigation