Lua:writeString

From Cheat Engine
Revision as of 20:39, 24 June 2026 by Leunsel (talk | contribs)
Jump to navigation Jump to search

<> Lua API Reference

function writeString(Address, Text, [WideChar]) : Boolean

Writes a string to the specified address in the currently opened (target) process. Set WideChar to true to write the string as widechar (UTF-16/Unicode). Returns true on success.

Function Parameters

Parameter Type Description
Address Integer or CEAddressString The address in the target process to write to.
Text String The string to write.
WideChar Boolean (optional) Set to true to write as a widechar (UTF-16/Unicode) string. Default is false (ASCII/ANSI).

Returns

Boolean — true if the write was successful, false otherwise.

Examples

-- Write an ASCII string to address 0x123456
local success = writeString(0x123456, "Hello, world!")
print("Write successful:", success)

-- Write a widechar (Unicode) string to a CEAddressString
writeString("game.exe+1234", "Unicode Text", true)

Main Pages

Core Lua documentation entry points

Lua
Script Engine

String Related Lua Functions

Encoding conversion and localized text helpers