Difference between revisions of "Lua:encodeFunction"

From Cheat Engine
Jump to navigation Jump to search
(Examples)
(Undo revision 7035 by Tuzi521 (talk))
(Tag: Undo)
 
Line 17: Line 17:
 
== Examples ==
 
== Examples ==
 
<pre>
 
<pre>
[DISABLE]
+
local function myCoolFunction(str) print(str) end
{$lua}
+
print(encodeFunction(myCoolFunction))
decodeFunction("c-n1LOOL7s7-f1V(EzIc7rmRdE2}UZL]4*7$][email protected]$LS;:vA6d#D:3!Lj?]WyO)y6FG9owQB5:}/jdPV%k3oF9ebqXc}a]#0{?cz:6$dv[Npz/*?e:@NnY(Aj[NzPo#*[email protected]}j]0D!;j(HY//54-{mZ,iQ!/Jw!tZ5.#q.BSKuU.g},pNlpeAYFsWz%**(iiW1nD/E!itXbhP1M{Tv9C%?*zuK?/D-R{%(.hO;5fw{RsOk=)i(SaTuYno1!b!sESwC}gW#ZD#fj2TwtJIo4YO]Huk+{s)n/sV8QQaa6r(6rcrbLA^D]:75CfXX-S_#XO)NnFEA(u?Jfi_/Xg=]MEA(ARM/4P?5Wa2i]OIBJ}WPM)J+eDm};/w+0#S*^G6(S7D0udn{/eC?GlO[jDcl]w^G$)#D?RaO:,+%KG9dD1!k]QnQxsW=e6H:iwnv#WCnL^mBjK(3!QK$9Yv80nc]#^[email protected]{4:/ijU)cSXgd3K#d_V]yHq.!ordh*WKReq?59Xw3EA.D.PaC7l/5^A5wZ^B6agiw%ToKUiQ%7](meSy!M=4V$M+#%M_7cPH/_P6ov3ogv#R*NC;il#j(pSRHTY:yllo+znh/Q-QHY][od3)sCYqKJb?Uejpl0GJeR^9*Y21([email protected])Lq$CUreK2J)da6?3k#S}RgW0+)jt14F%:bnvRDbB.lqfJuDHW!YFx)C*FVU,}yL18TNzSlk)ByFY6z2ye,SUAS#-1kZ4Y5rYW-:D-..4s)h(b%jD$uU8fu8upK8p6[W/@97TtoMW/}jq;8ce-sfg[HxH+k2:@_Ebf0H*Pk-XmsakI6BO;)#w12hE/^ttpXlJw0)omu[#oN0=S!//vWiv$3OWO6BuoL}f^zoF*$S/hiu:QaRg4sMV}*wLX05-Td;,%Y(%$qBHgz7t55Ei4K0*=RVMIyrZ8b;BUmRsG;IQQxB1K[N/q*x^KlW5]q_wF}Pn[xfZVviJ?YU9pto,Q3%*3fq0yQP_jA+V_gnh*6B0Q^il!1N{R7FF!Xcrn0#[email protected]*=][email protected]_+Y/2aSR]1aiWHGh-yq3-^J_$(XI%)m^b}}_3rC,Mg;cHUg)en8kp84_J59a##+)CWwam-r8/4?RTbE#(alQ#m#:0m,-65#?Y/]j{zG{fQ54Y:r/9YW]1Tu%4^8k75_R%[T:b+=2?WkKwk.{Ovp-J!8;HFazNOQ}{ULXP*TfMXl^xL=61]iNrOT93QTKDMSNQm]VYm3a6r?$cr][email protected]")()
+
</pre>
 +
<pre>
 +
local function myCoolFunction(str) print(str) end
 +
local encodedFunc = encodeFunction(myCoolFunction)
 +
local decodedFunc = decodeFunction(encodedFunc)
 +
decodedFunc('I have the power!')
 +
</pre>
 +
 
 +
{{LuaSeeAlso}}
 +
 
 +
=== Related Functions ===
 +
* [[Lua:decodeFunction|decodeFunction]]

Latest revision as of 12:00, 10 February 2021

function encodeFunction(function, protect OPTIONAL) : string

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

Function Parameters[edit]

Parameter Type Description
function function The function to encode

Examples[edit]

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[edit]

Related Functions[edit]