Lua:getAddress

From Cheat Engine
Jump to navigation Jump to search

function getAddress(String, [Local]) : Integer

Returns the address of a symbol, module, or export. If Local is true, queries the symbol table of the Cheat Engine process itself.

Function Parameters

Parameter Type Description
String String The symbol, module name, or export to resolve to an address.
Local Boolean (optional) If true, queries the symbol table of the Cheat Engine process. Default is false (target process).

Returns

Integer — The resolved address, or nil if not found.

Examples

-- Get the address of a registered symbol in the target process
registerSymbol("MySymbol", 0x401000)
local symAddr = getAddress("MySymbol")
print(string.format("MySymbol = 0x%X", symAddr))

-- Get the address of a symbol in the target process
local ceAddr = getAddress("cheatengine-x86_64-SSE4-AVX2.exe+5000")
print(string.format("CE process address = 0x%X", ceAddr))

See also

Related Functions