Difference between revisions of "Lua:inModule"

From Cheat Engine
Jump to navigation Jump to search
m (Syntax Highlighting.)
Line 19: Line 19:
  
 
===Examples===
 
===Examples===
<pre>
+
<syntaxhighlight lang="lua" line>
 
local address = getAddress("KERNEL32.AddAtomA")
 
local address = getAddress("KERNEL32.AddAtomA")
  
Line 27: Line 27:
 
   print("The address is not inside a module")
 
   print("The address is not inside a module")
 
end
 
end
</pre>
+
</syntaxhighlight>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}

Revision as of 16:30, 25 June 2026

<> Lua API Reference

function inModule(address) : boolean

Returns true if the given address is inside a module.

Function Parameters

Parameter Type Description
address Integer or CEAddressString The address to check.

Returns

boolean — True if the given address is inside a module, otherwise false.

Examples

1 local address = getAddress("KERNEL32.AddAtomA")
2 
3 if inModule(address) then
4   print("The address is inside a module")
5 else
6   print("The address is not inside a module")
7 end

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Related Functions