API:TomeGetNoteworthyPersonsEntryData
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns the name and text of an unlocked Noteworthy Persons entry.
entryData = TomeGetNoteworthyPersonsEntryData(entryId)
Arguments
- entryId
number– Entry id, as in theentrieslist of TomeGetNoteworthyPersonsZoneData.
Returns
- entryData
table– The entry's data, or nothing if the id is invalid or the entry is still locked.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Entry id. |
zoneId |
number |
Id of the zone the entry belongs to. |
name |
wstring |
Entry name. |
text |
wstring |
Entry text. |
Details
- Check with TomeIsNoteworthyPersonsEntryUnlocked first, as the stock UI does.
- The error messages carry the name
TomeIsNoteworthyPersonsEntryUnlocked, not this function's name. - The argument check is shared with TomeGetNoteworthyPersonsZoneData: if the argument is missing or not a number, the Invalid Parameters message names that function.
Errors
These are written to the UI log, and the function returns nothing.
Error in function call 'TomeIsNoteworthyPersonsEntryUnlocked': %d is not a valid entry id.Error in function call 'TomeIsNoteworthyPersonsEntryUnlocked': You have not yet unlocked entry # %d
Example
From ea_tomeofknowledge/source/tomewindow_noteworthypersons.lua:
local entryData = TomeGetNoteworthyPersonsEntryData( entryId )
if( entryData ~= nil ) then
name = entryData.name
text = entryData.text
...
end
