table.Sanitise

From Garry's Mod
Jump to: navigation, search
 table.Sanitise( )

Contents

Description

Converts Vectors, Angles and booleans to be able to be converted to and from key-values. table.DeSanitise does the opposite

Arguments

table tab

Table to sanitise

Returns

table

Sanitised table

Examples

Example

Example of what this function does.

local table1 = { "A", "Golden", Angle( 1, 2, 3 ), Vector( 1, 2, 3 ) }

PrintTable( table.Sanitise( table1 ) )

Output:

1	=	A
2	=	Golden
3:
		__type	=	Angle
		p	=	1
		r	=	3
		y	=	2
4:
		__type	=	Vector
		x	=	1
		y	=	2
		z	=	3
Personal tools
Navigation