Skip to main content

UnpackData

This function was added in DSL 1

Description

Unpacks values previously packed using PackData.

function UnpackData(serializedData) --[[ ... ]] end

Parameters

  • serializedData: string - The serialized string containing the packed values.

Return Values

  • ...: boolean|number|string|table|light userdata - The unpacked values. The number and types of returned values will match those passed to PackData.

Versions

  • DSL 7 - light userdata is supported, which lets you serialize hashes returned by ObjectNameToHashID.

Example

local packedData = PackData(true, 123, 'Hello', { key = 'value' }, lightUserData)
local unpackedData = UnpackData(packedData)
print('Unpacked Data: ', unpackedData)