Difference between revisions of "Lua:findTableFile"
Jump to navigation
Jump to search
BernieceA58 (talk | contribs) m (Created page with 'Start investigating about different [http://hidheadlightconversionkit.com Hid Headlights] and find the best one for your vehicle.') |
(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…') |
||
| Line 1: | Line 1: | ||
| − | + | '''function''' findTableFile(''filename'') | |
| + | |||
| + | 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=== | ||
| + | {|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0" | ||
| + | !align="left"|Parameter | ||
| + | !align="left"|Type | ||
| + | !style="width: 60%;background-color:white;" align="left"|Description | ||
| + | |- | ||
| + | |filename | ||
| + | |String | ||
| + | |The name of the file added to the cheat table | ||
| + | |} | ||
| + | |||
| + | ===Samples=== | ||
| + | |||
| + | Calling from LUA | ||
| + | |||
| + | <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': | ||
| + | |||
| + | [[Image: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: | ||
| + | |||
| + | [[Image:AddedFileMenu.png]] | ||
| + | |||
| + | |||
| + | |||
| + | == See also == | ||
| + | * [[TableFile]] | ||
| + | * [[MemoryStream]] | ||
Revision as of 00:47, 23 December 2015
function findTableFile(filename)
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 |
Samples
Calling from LUA
local file = findTableFile('protected.wav')
playSound(file)
Adding File
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:

