Lua:reinitializeSymbolhandler

From Cheat Engine
Revision as of 22:51, 26 June 2026 by Leunsel (talk | contribs) (Syntax Highlighting.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<> Lua API Reference

function reinitializeSymbolhandler(waittilldone OPTIONAL) : void

Reinitializes the symbol handler.

This is useful when new modules have been loaded and Cheat Engine should refresh its symbol information.

Function Parameters[edit]

Parameter Type Description
waittilldone Boolean OPTIONAL If true, waits until the symbol handler has finished reinitializing. Defaults to true.

Returns[edit]

This function does not return a value.

Examples[edit]

Reinitialize the symbol handler[edit]

1 reinitializeSymbolhandler()

Wait until reinitialization is done[edit]

1 reinitializeSymbolhandler(true)

Start reinitialization without waiting[edit]

1 reinitializeSymbolhandler(false)

Reinitialize after opening a process[edit]

1 openProcess("game.exe")
2 
3 -- Refresh symbols after opening the target process
4 reinitializeSymbolhandler()

Reinitialize after loading a module[edit]

1 local loaded = executeCodeEx(0, nil, getAddress("LoadLibraryA"), {
2   type = 3,
3   value = "example.dll"
4 })
5 
6 reinitializeSymbolhandler(true)

Resolve a symbol after refreshing[edit]

1 reinitializeSymbolhandler(true)
2 
3 local address = getAddressSafe("example.dll+1234")
4 
5 if address ~= nil then
6   print(string.format("%X", address))
7 end

Use with errorOnLookupFailure[edit]

1 errorOnLookupFailure(false)
2 
3 reinitializeSymbolhandler(true)
4 
5 local address = getAddressSafe("SomeSymbol")
6 
7 if address == nil then
8   print("Symbol not found")
9 end

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Symbol Related Lua Functions

Symbol lookup, address resolution, module checks, and lookup callbacks