API:CharacterSettingsExportUiProfile
From RoR Wiki
UI Lua API · CharacterSettings functions
Version: WAR 1.4.8
Copies one of the current character's UI profiles to another character, as a new profile.
CharacterSettingsExportUiProfile(profileName, serverName, characterName, newProfileName)
Arguments
- profileName
wstring– Name of the current character's profile to copy.- serverName
wstring– Server of the target character.- characterName
wstring– Name of the target character.- newProfileName
wstring– Name of the new profile for the target character.
Returns
Nothing.
Details
- The profile must exist for the current character and be owned by it. Otherwise one of the errors below is logged and nothing is copied.
- The target folder is
serverName\characterName\newProfileNameinside the user settings folder. If it already exists, the third error below is logged and nothing is copied. - Otherwise the profile's folder is copied to the target folder.
- No event is fired.
- All four arguments must be wide strings. The function needs at least four arguments and only reads the last four.
Errors
Logged; the call does not raise a Lua error:
ERROR Exporting UI Profile '%s'. Profile does not exist for this character.ERROR Exporting UI Profile '%s'. You may not modify a profile owned by another character.ERROR Exporting UI Profile '%s'. Export Path '%s' already exists.
Example
From ea_uiprofileswindow/source/exportuiprofilewindow.lua, where the target character comes from the window's character list:
local exportCharacter = m.selectedCharacter.characterName local exportServer = m.selectedCharacter.serverName local exportProfile = EA_Window_UiProfileExportEditBox.Text CharacterSettingsExportUiProfile( m.selectedProfileName, exportServer, exportCharacter, exportProfile )
