Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:EA Window HelpGetFAQEntryData

From RoR Wiki

UI Lua API · Help functions
Version: WAR 1.4.8

Returns the answer text of one FAQ entry.

entry = EA_Window_HelpGetFAQEntryData(entryId)

Arguments

entryId
number – Entry id, the id field of an entry from the entries list of EA_Window_HelpGetFAQTopicList. Fractions are dropped.

Returns

entry
table – A table with one field:
Key Type Meaning
text wstring The answer text. Empty if the client's FAQ text list is not loaded.

Details

  • The client looks the entry up by id in its FAQ data and reads the text from its game_faq_entry_text data list.
  • The question itself is not included; use the name field from EA_Window_HelpGetFAQTopicList.
  • Only ids that come from EA_Window_HelpGetFAQTopicList should be passed: the client does not check that the id exists before using the lookup result.
  • The function needs at least one argument and only reads the last one.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From ea_helpwindow/source/faqwindow.lua:

function FAQWindow.DisplayFAQEntry( id, name )
    local entryData = EA_Window_HelpGetFAQEntryData( id )
    LabelSetText( "FAQWindowTopicLabel", name )        -- display the title for the entry
    LabelSetText( "FAQWindowMainText", entryData.text )-- display the entry's text

See also