Lua:registerSymbol
Jump to navigation
Jump to search
<> Reference
function registerSymbol(symbolname, address, donotsave) : void
Registers a user-defined symbol.
The registered symbol can then be used in places where Cheat Engine accepts symbols or address strings. If donotsave is true, the symbol will not be saved when the table is saved.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| symbolname | String | The name of the user-defined symbol to register. |
| address | Integer or CEAddressString | The address the symbol should point to. |
| donotsave | Boolean (optional) | If true, the symbol will not be saved when the table is saved. |
Returns
void — This function does not return any value.
Examples
1 local address = getAddress("KERNEL32.AddAtomA")
2
3 registerSymbol("MyAddAtomA", address)
4
5 print(string.format("%X", getAddress("MyAddAtomA")))
1 local address = allocateMemory(1024)
2
3 -- Register a temporary symbol that will not be saved with the table
4 registerSymbol("TemporaryMemoryBlock", address, true)
5
6 printf("%X",getAddressSafe("TemporaryMemoryBlock"))
See Also
Main Pages