Difference between revisions of "Lua:getScreenWidth"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "<p> <b>getScreenWidth()</b>: Returns the screen width </p> <pre> print(getScreenWidth()) </pre>")
 
 
Line 1: Line 1:
<p>
+
[[Category:Lua]]
<b>getScreenWidth()</b>: Returns the screen width
+
{{CodeBox|'''function''' getScreenWidth() ''':''' integer}}
</p>
+
 
 +
Returns the screen width.
 +
 
 +
===Function Parameters===
 +
This function has no parameters.
 +
 
 +
===Returns===
 +
integer — The width of the screen in pixels.
 +
 
 +
===Examples===
 +
 
 
<pre>
 
<pre>
print(getScreenWidth())
+
local width = getScreenWidth()
 +
print("Screen width: " .. width)
 
</pre>
 
</pre>
 +
 +
{{LuaSeeAlso}}

Latest revision as of 03:44, 21 June 2026

<> Lua API Reference

function getScreenWidth() : integer

Returns the screen width.

Function Parameters[edit]

This function has no parameters.

Returns[edit]

integer — The width of the screen in pixels.

Examples[edit]

local width = getScreenWidth()
print("Screen width: " .. width)

Main Pages

Core Lua documentation entry points

Lua
Script Engine