Difference between revisions of "Lua:getAddress"

From Cheat Engine
Jump to navigation Jump to search
(Created page with ''''function''' getAddress(''AddressString'') Passes the given string to Cheat Engine's symbol handler and returns the corresponding address as an integer ===Function Parameters…')
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''function''' getAddress(''AddressString'')
+
[[Category:Lua]]
 +
'''function''' getAddress(''AddressString'', ''local'' OPTIONAL) ''':''' integer
 +
 
 +
Passes the given string to Cheat Engine's symbol handler and returns the corresponding address as an integer. Can be a module name or an export. Set ''local'' to true if you wish to query the symbol table of the CE process.
 +
 
 +
If errorOnLookupFailure is set to true (the default value), if you look up a symbol that does not exist, it will throw an error. With errorOnLookupFailure set to false, it will return 0.
  
Passes the given string to Cheat Engine's symbol handler and returns the corresponding address as an integer
 
  
 
===Function Parameters===
 
===Function Parameters===
Line 11: Line 15:
 
|AddressString
 
|AddressString
 
|[[CEAddressString]]
 
|[[CEAddressString]]
|The addressstring to convert to an integer
+
|The AddressString to convert to an integer
 +
|-
 +
|local
 +
|Boolean
 +
|Set to true if you wish to query the symbol table of the CE process
 
|}
 
|}
  
  
== See also ==
+
{{LuaSeeAlso}}
* [[Lua]]
+
 
 +
=== Related Functions ===
 +
* [[Lua:getAddressSafe|getAddressSafe]]
 +
* [[Lua:getNameFromAddress|getNameFromAddress]]
 +
* [[Lua:getCommonModuleList|getCommonModuleList]]
 +
* [[Lua:inModule|inModule]]
 +
* [[Lua:inSystemModule|inSystemModule]]
 +
* [[Lua:targetIs64Bit|targetIs64Bit]]
 +
* [[Lua:enumModules|enumModules]]

Latest revision as of 03:38, 18 April 2018

function getAddress(AddressString, local OPTIONAL) : integer

Passes the given string to Cheat Engine's symbol handler and returns the corresponding address as an integer. Can be a module name or an export. Set local to true if you wish to query the symbol table of the CE process.

If errorOnLookupFailure is set to true (the default value), if you look up a symbol that does not exist, it will throw an error. With errorOnLookupFailure set to false, it will return 0.


Function Parameters[edit]

Parameter Type Description
AddressString CEAddressString The AddressString to convert to an integer
local Boolean Set to true if you wish to query the symbol table of the CE process


See also[edit]

Related Functions[edit]