Difference between revisions of "Lua:findTableFile"
Jump to navigation
Jump to search
(Created page with ''''function''' findTableFile(''filename'') Returns a TableFile object representing a file stored with the cheat table. You can retrieve the data as a MemoryStream or sav…') |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | '''function''' findTableFile(''filename'') | + | [[Category:Lua]] |
| + | '''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 8: | Line 9: | ||
!align="left"|Parameter | !align="left"|Parameter | ||
!align="left"|Type | !align="left"|Type | ||
| − | !style="width: | + | !style="width: 80%;background-color:white;" align="left"|Description |
|- | |- | ||
|filename | |filename | ||
| Line 15: | Line 16: | ||
|} | |} | ||
| − | == | + | == Example == |
| + | local file = findTableFile('protected.wav') | ||
| + | playSound(file) | ||
| − | + | === Adding a File === | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | ===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 35: | Line 33: | ||
| + | {{LuaSeeAlso}} | ||
| + | |||
| + | === Related Functions === | ||
| + | * [[Lua:createTableFile|createTableFile]] | ||
| − | == | + | === Related Classes === |
| − | * [[TableFile]] | + | * [[Lua:Class:TableFile|TableFile]] |
| − | * [[MemoryStream]] | + | * [[Lua:Class:MemoryStream|MemoryStream]] |
Latest revision as of 05:43, 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.
Contents
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| filename | String | The name of the file added to the cheat table |
Example[edit]
local file = findTableFile('protected.wav')
playSound(file)
Adding a File[edit]
To add a file to your table, open the 'Table' menu and pick 'Add File':
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:

