Difference between revisions of "Lua:findTableFile"

From Cheat Engine
Jump to navigation Jump to search
(See also)
Line 1: Line 1:
 
[[Category:Lua]]
 
[[Category:Lua]]
'''function''' findTableFile(''filename'')
+
'''function''' findTableFile(''filename'') ''':''' UserData
  
Returns a [[TableFile]] object representing a file stored with the cheat table.
+
Returns a [[Lua:Class:TableFile|TableFile]] object representing a file stored with the cheat table.
You can retrieve the data as a [[MemoryStream]] or save it to disk.
+
You can retrieve the data as a [[Lua:Class:MemoryStream|MemoryStream]] or save it to disk.
  
 
===Function Parameters===
 
===Function Parameters===
Line 16: Line 16:
 
|}
 
|}
  
===Samples===
+
== Example ==
 +
Calling from LUA:
 +
local file = findTableFile('protected.wav')
 +
playSound(file)
  
Calling from LUA
+
=== Adding a File ===
 
 
<pre>local file = findTableFile('protected.wav')
 
playSound(file)</pre>
 
 
 
===Adding File===
 
  
 
To add a file to your table, open the 'Table' menu and pick 'Add File':
 
To add a file to your table, open the 'Table' menu and pick 'Add File':
Line 36: Line 34:
  
  
 +
{{LuaSeeAlso}}
 +
 +
=== Related Functions ===
 +
* [[Lua:createTableFile|createTableFile]]
  
== See also ==
+
=== Related Classes ===
* [[Lua:TableFile|TableFile]]
+
* [[Lua:Class:TableFile|TableFile]]
* [[Lua:MemoryStream|MemoryStream]]
+
* [[Lua:Class:MemoryStream|MemoryStream]]

Revision as of 05:38, 25 January 2018

function findTableFile(filename) : UserData

Returns a TableFile object representing a file stored with the cheat table. You can retrieve the data as a MemoryStream or save it to disk.

Function Parameters

Parameter Type Description
filename String The name of the file added to the cheat table

Example

Calling from LUA:

local file = findTableFile('protected.wav')
playSound(file)

Adding a File

To add a file to your table, open the 'Table' menu and pick 'Add File':

AddFile.png

Pick the file and it will be added to the table with the same name and show up as a separate entry below 'Add file' in the 'Table' menu. From that you can rename it, save it out to disk, or delete it:

AddedFileMenu.png


See also

Related Functions

Related Classes