Difference between revisions of "Lua:resetLuaState"
Jump to navigation
Jump to search
m (moved resetLuaState to Lua:resetLuaState) |
|||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | '''function''' resetLuaState() | + | {{CodeBox|'''function''' resetLuaState() ''':''' void}} |
| − | Creates a new | + | 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. | ||
{{LuaFunctionParametersNone}} | {{LuaFunctionParametersNone}} | ||
| + | |||
| + | ===Returns=== | ||
| + | This function does not return a value. | ||
| + | |||
| + | ===Examples=== | ||
| + | <pre> | ||
| + | resetLuaState() | ||
| + | </pre> | ||
| + | |||
| + | <pre> | ||
| + | -- Use with care. The old Lua state is not destroyed. | ||
| + | resetLuaState() | ||
| + | |||
| + | print("A new Lua state has been created") | ||
| + | </pre> | ||
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
Latest revision as of 00:51, 25 June 2026
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")