Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SendHelpMessage

From RoR Wiki

UI Lua API · Social functions
Version: WAR 1.4.8

Sends a help request to the server: an appeal (petition), a report, a bug report, feedback, or an update or cancellation of an appeal.

SendHelpMessage(helpType, topic, category, details, field1, string1, field2, string2, field3, string3, field4, string4)

Arguments

helpType
number – A GameData.HelpType value: CREATE_APPEAL_NON_VALIDATED (0), CREATE_APPEAL_NAMING_VIOLATION (1), CREATE_APPEAL_VIOLATION_REPORT (2), CREATE_APPEAL_GOLD_SELLER (3), CREATE_BUG_REPORT (4), CREATE_FEEDBACK (5), UPDATE_APPEAL (6), CANCEL_APPEAL (7).
topic
number – Subtype of the message, for appeals a GameData.AppealTopic value; for bug reports and feedback the selected type. Sent as an 8-bit value.
category
wstring – Topic category.
details
wstring – The text of the message.
field1
number – Field id for string1.
string1
wstring – Extra text field 1.
field2
number – Field id for string2.
string2
wstring – Extra text field 2.
field3, string3, field4, string4
number, wstring – Not used by the client, but must be given with these types.

Returns

Nothing.

Details

  • If details is empty and helpType is not CANCEL_APPEAL, the client shows an error dialog and sends nothing.
  • Which of the other arguments are sent depends on helpType. Bug reports and feedback send topic and details; UPDATE_APPEAL sends only details; CANCEL_APPEAL sends no text.
  • Any helpType above 7 sends nothing.
  • If the Lua state is not available, nothing happens.
  • The function needs at least twelve arguments and only reads the last twelve.

Errors

None besides the generic Invalid Parameters message when an argument has the wrong type.

Example

Sending a bug report, from default/ea_helpwindow/source/bugreportwindow.lua:

SendHelpMessage(GameData.HelpType.CREATE_BUG_REPORT, BugReportWindow.selectedType, L"",
                TextEditBoxGetText("BugReportWindowText"), 0, L"", 0, L"", 0, L"", 0, L"")

The parameter list, as documented in the same file:

-- SendHelpMessage expects the following params:
--      param1 (number) = The type of help message this is, defined by GameData.HelpType.*
--      param2 (number) = The subtype, aka topic, of this message.  Defined by GameData.AppealTopic.*
--      param3 (WString) = The sub-subtype, aka topic category, of this message. Defined by EViolation
--      param4 (WString) = The details field of this message.
--      param5 (number)  = field ID for string 1
--      param6 (WString) = Generic string1 param
...

See also