Difference between revisions of "Lua:showMessage"

From Cheat Engine
Jump to navigation Jump to search
m
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
'''function''' showMessage(''Text'')
 
'''function''' showMessage(''Text'')
  
Displays a messagebox without an icon and only an "OK" button at the center of the screen with the provided text.
+
Displays a simple message box with the given text and an OK button.
 
 
  
 
===Function Parameters===
 
===Function Parameters===
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
+
{|width="85%" cellpadding="10%" cellspacing="0" border="0"
 
!align="left"|Parameter
 
!align="left"|Parameter
 
!align="left"|Type
 
!align="left"|Type
Line 13: Line 12:
 
|Text
 
|Text
 
|String
 
|String
|The message to show
+
|The message to display in the message box.
 
|}
 
|}
  
 +
===Examples===
 +
<pre>
 +
showMessage("Hello, world!")
 +
 +
local name = "Player"
 +
showMessage("Welcome, " .. name .. "!")
 +
</pre>
  
== See also ==
+
===See Also===
 +
* [[messageDialog]]
 +
* [[inputQuery]]
 
* [[Lua]]
 
* [[Lua]]

Latest revision as of 23:53, 10 July 2025

function showMessage(Text)

Displays a simple message box with the given text and an OK button.

Function Parameters[edit]

Parameter Type Description
Text String The message to display in the message box.

Examples[edit]

showMessage("Hello, world!")

local name = "Player"
showMessage("Welcome, " .. name .. "!")

See Also[edit]