Lua:autoAssembleCheck

From Cheat Engine
Revision as of 00:18, 5 December 2025 by Leunsel (talk | contribs) (Added CodeBox Template.)
Jump to navigation Jump to search

<> Lua API Reference

function autoAssembleCheck(text, enable, targetself)

Checks the given Auto Assembler script for syntax errors. Returns true on success, or false with an error message on failure.

Function Parameters

Parameter Type Description
text String The Auto Assembler script to validate.
enable Boolean If set, checks the [ENABLE] part of the script.
targetself Boolean If true, checks the script as if assembling into Cheat Engine itself.

Example

local script = [[
  alloc(newmem,1024)
  label(returnhere)
  ...
]]

local ok, err = autoAssembleCheck(script, true, false)
if ok then
  print("Script is valid")
else
  print("Syntax error:", err)
end

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Assembler and Disassembler Related Lua Functions

Auto assembler, disassembly helpers, instruction size lookup, and assembler callbacks