deleteTableEntry: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page DeleteTableEntry to deleteTableEntry: Converting page titles to lowercase)
m (Text replacement - "source>" to "syntaxhighlight>")
Line 10: Line 10:
<source lang="mtmacro" line>
<source 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.}}
Line 19: Line 19:
[r:deleteTableEntry("test",2)]
[r:deleteTableEntry("test",2)]
[r:setTableRoll("test","")]
[r:setTableRoll("test","")]
</source>
</syntaxhighlight>
|also=
|also=
{{func|clearTable}} {{func|addTableEntry}} {{func|setTableRoll}}
{{func|clearTable}} {{func|addTableEntry}} {{func|setTableRoll}}
}}
}}
[[Category:Table Function]]
[[Category:Table Function]]

Revision as of 17:07, 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

<source lang="mtmacro" line> deleteTableEntry(tableName,roll) </syntaxhighlight> 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

<source lang="mtmacro" line>

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

</syntaxhighlight>

See Also