Difference between revisions of "Lua:registerCustomTypeLua"

From Cheat Engine
Jump to navigation Jump to search
(Replaced content with '<span style="font-size:25px;color:red">Sorry! Content not available.</span>')
m (Reverted edits by This content is not available (Talk) to last revision by Igromanru)
 
Line 1: Line 1:
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
+
[[Category:Lua]]
 +
'''function''' registerCustomTypeLua(''typename'', ''bytecount'', ''bytestovaluefunction'', ''valuetobytesfunction'', ''isFloat'')
 +
 
 +
Registers a custom variable type based on lua scripts
 +
 
 +
The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result
 +
 
 +
The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write
 +
 
 +
 
 +
===Function Parameters===
 +
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 +
!align="left"|Parameter
 +
!align="left"|Type
 +
!style="width: 80%;background-color:white;" align="left"|Description
 +
|-
 +
|typename
 +
|string
 +
|Name of the custom type
 +
|-
 +
|bytecount
 +
|integer
 +
|The number of bytes this variable contains
 +
|-
 +
|bytestovaluefunction
 +
|function
 +
|Declared as function (b1,b2,b3,b4,...). Must return an integer representing what those bytes mean
 +
|-
 +
|valuetobytesfunction
 +
|function
 +
|Declared as function (integer). Must return a row of bytes representing the given integer
 +
|-
 +
|isFloat
 +
|boolean
 +
|}
 +
 
 +
{{LuaSeeAlso}}
 +
 
 +
=== Related Functions ===
 +
* [[Lua:registerCustomTypeAutoAssembler|registerCustomTypeAutoAssembler]]

Latest revision as of 19:10, 18 March 2019

function registerCustomTypeLua(typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)

Registers a custom variable type based on lua scripts

The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result

The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write


Function Parameters[edit]

Parameter Type Description
typename string Name of the custom type
bytecount integer The number of bytes this variable contains
bytestovaluefunction function Declared as function (b1,b2,b3,b4,...). Must return an integer representing what those bytes mean
valuetobytesfunction function Declared as function (integer). Must return a row of bytes representing the given integer
isFloat boolean

See also[edit]

Related Functions[edit]