Lua:resetLuaState

From Cheat Engine
Revision as of 00:51, 25 June 2026 by Leunsel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<> Lua API Reference

function resetLuaState() : void

Creates a new Lua state that will be used by Cheat Engine.

The old Lua state is not destroyed. This means that calling this function can leak memory.

Function Parameters[edit]

<none>

Returns[edit]

This function does not return a value.

Examples[edit]

resetLuaState()
-- Use with care. The old Lua state is not destroyed.
resetLuaState()

print("A new Lua state has been created")

Main Pages

Core Lua documentation entry points

Lua
Script Engine