Garry's Mod Wiki

table.Sanitise

  table table.Sanitise( table tab )

Description

Converts Vectors, Angles and booleans to be able to be converted to and from key-values via util.TableToKeyValues.

table.DeSanitise performs the opposite transformation.

Arguments

1 table tab
Table to sanitise

Returns

1 table
Sanitised table

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