Garry's Mod Wiki

Revision Difference

table.Sanitise#511827

<function name="Sanitise" parent="table" type="libraryfunc">⤶ <description>Converts <page>Vector</page>s, <page>Angle</page>s and <page>boolean</page>s to be able to be converted to and from key-values. <page>table.DeSanitise</page> does the opposite</description>⤶ <realm>Shared and Menu</realm>⤶ <file line="252">lua/includes/extensions/table.lua</file>⤶ <args>⤶ <arg name="tab" type="table">Table to sanitise</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="table">Sanitised table</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Example of what this function does.</description>⤶ <code>⤶ local table1 = { "A", "Golden", Angle( 1, 2, 3 ), Vector( 1, 2, 3 ) }⤶ ⤶ PrintTable( table.Sanitise( table1 ) )⤶ </code>⤶ <outputfixedwidth>Fixed width</outputfixedwidth>⤶ <output>⤶ 1 = A⤶ 2 = Golden⤶ 3:⤶ __type = Angle⤶ p = 1⤶ r = 3⤶ y = 2⤶ 4:⤶ __type = Vector⤶ x = 1⤶ y = 2⤶ z = 3⤶ </output>⤶ ⤶ </example>