addTableEntry: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=addTableEntry |version=1.4.0.1 |description= Adds a new row to the specified table. May only be used by GM or a trusted macro. '''Note:''' adding a row t...") |
No edit summary |
||
Line 4: | Line 4: | ||
|description= | |description= | ||
Adds a new row to the specified table. May only be used by GM or a trusted macro. | Adds a new row to the specified table. May only be used by GM or a trusted macro. | ||
'''Note:''' adding a row to a table will not automatically change the table row value, so this should be updated to avoid possible errors. | |||
'''Note:''' adding a row to a table will not automatically change the table row value, so this should be updated to avoid possible errors (See setTableRoll() function). | |||
|usage= | |usage= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> |
Revision as of 09:20, 3 May 2016
addTableEntry() Function
• Introduced in version 1.4.0.1
Adds a new row to the specified table. May only be used by GM or a trusted macro.
Note: adding a row to a table will not automatically change the table row value, so this should be updated to avoid possible errors (See setTableRoll() function).
Usage
addTableEntry(tableName,rangeStart,rangeEnd,result)
addTableEntry(tableName,rangeStart,rangeEnd,result,imageId)
Parameters
tableName
- A string containing the name of the Table.rangeStart
- An integer indicating the lowest value that will return this row.rangeEnd
- An integer indicating the highest value that will return this row.result
- A string containing the result returned by the table() function.imageId
- Optional and is the asset id of an image that will be returned by the tableImage() function.
Examples
[r:addTableEntry("test",1,3,"bert")]
[r:addTableEntry("test",4,4,"fred")]
[r:addTableEntry("test",5,5,"alf", getTokenImage())]
[r:setTableRoll("test","")]