Difference between revisions of "Lua:Class:TableFile"

From Cheat Engine
Jump to navigation Jump to search
(Related Functions)
Line 43: Line 43:
  
 
=== Related Functions ===
 
=== Related Functions ===
* [[createTableFile]]
+
* [[Lua:createTableFile|createTableFile]]
* [[findTableFile]]
+
* [[Lua:findTableFile|findTableFile]]
* [[createMemoryStream]]
+
* [[Lua:createMemoryStream|createMemoryStream]]
* [[createFileStream]]
+
* [[Lua:createFileStream|createFileStream]]
* [[createStringStream]]
+
* [[Lua:createStringStream|createStringStream]]
  
 
=== Related Classes ===
 
=== Related Classes ===

Revision as of 01:37, 25 January 2018

TableFile class: (Inheritance: Object)

Class for Cheat Engine Table Files (CE Form->Menu->Table)

Table files can be added from the Cheat Engine form.

  • CE Form->Menu->Table->Add file

Creation

findTableFile(fileName) : TableFile
Returns the TableFile class object for the saved file
createTableFile(fileName, filePath OPTIONAL) : TableFile
Returns a newly added table file.
If no file path is specified, it will create a blank file. Otherwise, it will read the contents from disk.

Properties

Name : string
The table file's name.
Stream : MemoryStream
The table file's underlying MemoryStream object.

Methods

saveToFile(filePath)
Saves the TableFile to the given file path.
getData() : MemoryStream
Returns the table file's underlying MemoryStream object.

Examples

local fileStr = nil
local tableFile = findTableFile('PlayerBaseHook.CEA')
if tableFile ~= nil then
  local stringStream = createStringStream()
  stringStream.Position = 0 -- if not set before using 'copyFrom' the 'StringStream' object will be inconsistent.
  stringStream.copyFrom(tableFile.Stream, tableFile.Stream.Size)
  fileStr = stringStream.DataString
  stringStream.destroy()
end

See also

Related Functions

Related Classes