Difference between revisions of "Lua:getCPUCount"

From Cheat Engine
Jump to navigation Jump to search
(Created page with 'Category:Lua '''function''' getCPUCount() Returns the number of CPU's. {{LuaFunctionParametersNone}} == Examples == <pre> getCPUCount() </pre> {{LuaSeeAlso}} === Related…')
 
Line 1: Line 1:
 
[[Category:Lua]]
 
[[Category:Lua]]
'''function''' getCPUCount()
+
{{CodeBox|'''function''' getCPUCount() ''':''' integer}}
  
Returns the number of CPU's.
+
Returns the number of CPUs.
  
{{LuaFunctionParametersNone}}
+
===Function Parameters===
 +
This function has no parameters.
  
== Examples ==
+
===Returns===
 +
integer — The number of CPUs.
 +
 
 +
===Examples===
 
<pre>
 
<pre>
getCPUCount()
+
local cpuCount = getCPUCount()
 +
 
 +
print("CPU count: " .. cpuCount)
 
</pre>
 
</pre>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
 
=== Related Functions ===
 
* [[Lua:getThreadlist|getThreadlist]]
 

Revision as of 04:48, 21 June 2026

<> Lua API Reference

function getCPUCount() : integer

Returns the number of CPUs.

Function Parameters

This function has no parameters.

Returns

integer — The number of CPUs.

Examples

local cpuCount = getCPUCount()

print("CPU count: " .. cpuCount)

Main Pages

Core Lua documentation entry points

Lua
Script Engine