Lua:encodeFunction

From Cheat Engine
Revision as of 02:54, 18 April 2018 by TheyCallMeTim13 (talk | contribs) (Created page with 'Category:Lua '''function''' encodeFunction(''function'', ''protect'' OPTIONAL) ''':''' string Converts a given function into an encoded string that you can pass to [[Lua:fin…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

function encodeFunction(function, protect OPTIONAL) : string

Converts a given function into an encoded string that you can pass to decodeFunction.

Function Parameters

Parameter Type Description
function function The function to encode

Examples

local function myCoolFunction(str) print(str) end
print(encodeFunction(myCoolFunction))
local function myCoolFunction(str) print(str) end
local encodedFunc = encodeFunction(myCoolFunction)
local decodedFunc = decodeFunction(encodedFunc)
decodedFunc('I have the power!')

See also

Related Functions