Difference between revisions of "Lua:createTableFile"
Jump to navigation
Jump to search
(Created page with 'Category:Lua '''function''' createTableFile(''fileName'', ''filePath'' OPTIONAL) ''':''' TableFile Creates and adds a new TableFile object representi…') |
m (Reverted edits by This content is not available (Talk) to last revision by TheyCallMeTim13) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 21: | Line 21: | ||
== Examples == | == Examples == | ||
− | + | <pre> | |
− | + | local file = createTableFile('protected.wav') | |
− | + | playSound(file) | |
− | + | </pre> | |
− | + | <pre><nowiki> | |
+ | local file = createTableFile('protected.wav', [[C:\SomeDirectory\MySounds]]) | ||
+ | playSound(file) | ||
+ | </nowiki></pre> | ||
=== Adding a File === | === Adding a 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''': |
[[Image:AddFile.png]] | [[Image:AddFile.png]] | ||
Pick the file and it will be added to the table with the same name and show | 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 | + | 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: | you can rename it, save it out to disk, or delete it: | ||
Latest revision as of 19:07, 18 March 2019
function createTableFile(fileName, filePath OPTIONAL) : TableFile
Creates and adds a new 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 to be added to the cheat table |
filePath | String | The path to the file to be added to the cheat table |
Examples[edit]
local file = createTableFile('protected.wav') playSound(file)
local file = createTableFile('protected.wav', [[C:\SomeDirectory\MySounds]]) 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: