deleteTableEntry: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=deleteTableEntry |version=1.4.0.1 |description= Removes a row from the specified table. May only be used by GM or a trusted macro. '''Note:''' deleting...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
|name=deleteTableEntry
|name=deleteTableEntry
|version=1.4.0.1
|version=1.4.0.1
|trusted=true
|description=
|description=
Removes a row from the specified table. May only be used by GM or a trusted macro.
Removes a row from the specified table.


'''Note:''' deleting a row from a table will not automatically change the table row value, so this should be updated to avoid possible errors.
'''Note:''' deleting a row from a table will not automatically change the table row value, so this should be updated to avoid possible errors.
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
deleteTableEntry(tableName,roll)
deleteTableEntry(tableName,roll)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|tableName|A string specifying the table from which the row will be removed.}}
{{param|tableName|A string specifying the table from which the row will be removed.}}
{{param|roll|An integer and the value that specifies the row to be removed.}}
{{param|roll|An integer and the value that specifies the row to be removed.}}
|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r:addTableEntry("test",1,3,"bert")]
[r:addTableEntry("test",1,3,"bert")]
[r:deleteTableEntry("test",2)]
[r:deleteTableEntry("test",2)]
[r:setTableRoll("test","")]
[r:setTableRoll("test","")]
</source>
</syntaxhighlight>
|also=
|also=
[[table (function)|table()]]
{{func|clearTable}} {{func|addTableEntry}} {{func|setTableRoll}}
}}
}}
[[Category:Table Function]]
[[Category:Table Function]]

Latest revision as of 23:59, 14 March 2023

deleteTableEntry() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.4.0.1
Removes a row from the specified table. Note: deleting a row from a table will not automatically change the table row value, so this should be updated to avoid possible errors.

Usage

deleteTableEntry(tableName,roll)

Parameters

  • tableName - A string specifying the table from which the row will be removed.
  • roll - An integer and the value that specifies the row to be removed.

Examples

[r:addTableEntry("test",1,3,"bert")]
[r:deleteTableEntry("test",2)]
[r:setTableRoll("test","")]

See Also