Difference between revisions of "Lua:writeBytes"
Jump to navigation
Jump to search
m |
m (Added CodeBox Template.) |
||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | '''function''' writeBytes(''Address'', ''Byte1'', [''Byte2'', ...]) | + | {{CodeBox|'''function''' writeBytes(''Address'', ''Byte1'', [''Byte2'', ...])}} |
| − | '''function''' writeBytes(''Address'', ''Table'') | + | {{CodeBox|'''function''' writeBytes(''Address'', ''Table'')}} |
Writes bytes to the specified address in the currently opened (target) process. | Writes bytes to the specified address in the currently opened (target) process. | ||
Revision as of 23:00, 4 December 2025
Writes bytes to the specified address in the currently opened (target) process. You can provide the bytes as separate arguments or as a table.
Function Parameters
writeBytes(address, byte1, [byte2, ...])
| Parameter | Type | Description |
|---|---|---|
| Address | CEAddressString or Integer | The address in the target process to write to. |
| Byte1, Byte2, ... | Integer | The bytes to write (as separate arguments). |
writeBytes(address, table)
| Parameter | Type | Description |
|---|---|---|
| Address | CEAddressString or Integer | The address in the target process to write to. |
| Table | Table | A table containing the bytes to write. |
Examples
-- Write 4 bytes to an address
writeBytes(0x123456, 0x90, 0x90, 0x90, 0x90)
-- Write bytes from a table
local bytes = {0xDE, 0xAD, 0xBE, 0xEF}
writeBytes(0x654321, bytes)