Quantcast
Download
(121 Kb)
Download
Updated: 07/15/19 08:38 AM
Pictures
File Info
Compatibility:
Wrathstone (4.3)
Murkmire (4.2)
Updated:07/15/19 08:38 AM
Created:12/02/18 04:02 PM
Monthly downloads:686
Total downloads:2,324
Favorites:21
MD5:
Synced Account Settings  Updated less than 3 days ago!
Version: 0.2
by: Jodynn [More]
Syncs your account settings for you

You log onto someone you like their settings, you go into this addon settings (/accountsettings) and click save settings, confirm that, yes you want to do that, make sure sync is on and you're good.

Now anytime you zone/log in on all of your characters you will have the same settings you did whenever you pressed that button.

Settings
Sync - automatically sync your current settings to your saved settings once saved
Save button - Save your settings at this point and time.
Log - Log messages about saved/synced.
Debug - Log messages about debug.

COLOR="magenta"]Future Plans[/color]
- Keybindings
- Idk what else yet, maybe look into Addon's settings, but, that's a slippery slope.


Donation Link

https://paypal.me/pools/c/8a80aoQpa4
V0.2
Fixed debug, sep option for log and debug now, and removed libs

V0.11
Fix logging
Archived Files (4)
File Name
Version
Size
Uploader
Date
0.11
152kB
Jodynn
07/13/19 12:42 PM
0.11
146kB
Jodynn
07/13/19 12:36 PM
0.1
148kB
Jodynn
02/25/19 09:41 AM
0.1
132kB
Jodynn
12/02/18 04:02 PM


Post A Reply Comment Options
Unread 07/15/19, 04:06 PM  
Jodynn
 
Jodynn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 117
Uploads: 9
Re: Re: Still Getting Error

Originally Posted by Baertram
The ":" makes the difference!

As AccountSettings is an object and your functions AccountSettings:Log(color, message) has 2 parameters, calling it as non-object like this
AccountSettings.Log(color, message) will additionally need the object's variable (pointing to self or the instance of your created AccountSettings) as first parameter!

So everywhere you are using AccountSettings.Log(color, message) you need to change it to either
AccountSettings:Log(color, message) or
AccountSettings.Log(objectOfAccountSettings, color, message)

If you call AccountSettings.Log from within any function of AccountSettings: like AccountSettings:SaveSettings you can use "self" as the objectOfAccountSettings.
e.g.

Lua Code:
  1. function AccountSettings:SaveSettings()
  2.     for _,x in ipairs(AccountSettings.SettingSystemType) do
  3.         for _, y in ipairs(AccountSettings.SettingIds[x]) do
  4.             local value = GetSetting(x,y)
  5.             AccountSettings.Log ( self, AccountSettings.DEBUG_COLOR, tostring( x ) .. " " .. tostring( y ) .. " ".. tostring(value) )
  6.             AccountSettings.sv.settings[x][y] = value
  7.         end
  8.     end
  9.  
  10.     for _,x in ipairs(AccountSettings.ChatColors) do
  11.         local r,g,b = GetChatCategoryColor (x)
  12.         local value = { r, g, b }
  13.  
  14.         AccountSettings.Log ( self, tostring( x ) .. " " .. tostring(value) ) --where is the message to output to the log here? You only apply the color parameter as it seems
  15.         AccountSettings.sv.chatColors[x] = value
  16.     end
  17.  
  18.     AccountSettings.sv.tracked = true
  19.     AccountSettings:Log ( self, AccountSettings.OKAY_COLOR, "Saved." )
  20. end

or the function will take color as the object, message as the color and the message itsself will be missing then.

Originally Posted by amber1019
Got this error:

user:/AddOns/AccountSettings/AccountSettings.lua:467: operator .. is not supported for nil .. string
stack traceback:
user:/AddOns/AccountSettings/AccountSettings.lua:467: in function 'AccountSettings:Log'
|caaaaaa<Locals> self = "ffff44", color = "1 0 0" </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:422: in function 'AccountSettings:SaveSettings'
|caaaaaa<Locals> self = tbl, _ = 1, x = 1, _ = 1, y = 0, value = 0 </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:502: in function 'func'
user:/AddOns/VotansFisherman/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua:63: in function 'callback'
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:77: in function 'HandleCallback'
|caaaaaa<Locals> clickedButton = ud, dialog = ud, instanceId = 1 </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:194: in function 'ZO_KeybindButtonMixin:OnClicked'
|caaaaaa<Locals> self = ud, visible = true </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:265: in function 'ZO_KeybindButtonTemplate_OnMouseUp'
|caaaaaa<Locals> self = ud, button = 1, upInside = true </Locals>|r
ZO_Dialog1Button2_MouseUp:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud, button = 1, upInside = true, ctrl = false, alt = false, shift = false, command = false </Locals>|r


Also, Log and Debug can only be both on or both off. Not one or the other. I don't think that's what you intended?
I know the differences, I'm normally using c, c# and c++ so I'm use to . anx -> ops, so sometimes my muscle memory doesn't care.

I'll fix the other error, been busy at work, thanks for the comments.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 02:10 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Re: Still Getting Error

The ":" makes the difference!

As AccountSettings is an object and your functions AccountSettings:Log(color, message) has 2 parameters, calling it as non-object like this
AccountSettings.Log(color, message) will additionally need the object's variable (pointing to self or the instance of your created AccountSettings) as first parameter!

So everywhere you are using AccountSettings.Log(color, message) you need to change it to either
AccountSettings:Log(color, message) or
AccountSettings.Log(objectOfAccountSettings, color, message)

If you call AccountSettings.Log from within any function of AccountSettings: like AccountSettings:SaveSettings you can use "self" as the objectOfAccountSettings.
e.g.

Lua Code:
  1. function AccountSettings:SaveSettings()
  2.     for _,x in ipairs(AccountSettings.SettingSystemType) do
  3.         for _, y in ipairs(AccountSettings.SettingIds[x]) do
  4.             local value = GetSetting(x,y)
  5.             AccountSettings.Log ( self, AccountSettings.DEBUG_COLOR, tostring( x ) .. " " .. tostring( y ) .. " ".. tostring(value) )
  6.             AccountSettings.sv.settings[x][y] = value
  7.         end
  8.     end
  9.  
  10.     for _,x in ipairs(AccountSettings.ChatColors) do
  11.         local r,g,b = GetChatCategoryColor (x)
  12.         local value = { r, g, b }
  13.  
  14.         AccountSettings.Log ( self, tostring( x ) .. " " .. tostring(value) ) --where is the message to output to the log here? You only apply the color parameter as it seems
  15.         AccountSettings.sv.chatColors[x] = value
  16.     end
  17.  
  18.     AccountSettings.sv.tracked = true
  19.     AccountSettings:Log ( self, AccountSettings.OKAY_COLOR, "Saved." )
  20. end

or the function will take color as the object, message as the color and the message itsself will be missing then.

Originally Posted by amber1019
Got this error:

user:/AddOns/AccountSettings/AccountSettings.lua:467: operator .. is not supported for nil .. string
stack traceback:
user:/AddOns/AccountSettings/AccountSettings.lua:467: in function 'AccountSettings:Log'
|caaaaaa<Locals> self = "ffff44", color = "1 0 0" </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:422: in function 'AccountSettings:SaveSettings'
|caaaaaa<Locals> self = tbl, _ = 1, x = 1, _ = 1, y = 0, value = 0 </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:502: in function 'func'
user:/AddOns/VotansFisherman/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua:63: in function 'callback'
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:77: in function 'HandleCallback'
|caaaaaa<Locals> clickedButton = ud, dialog = ud, instanceId = 1 </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:194: in function 'ZO_KeybindButtonMixin:OnClicked'
|caaaaaa<Locals> self = ud, visible = true </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:265: in function 'ZO_KeybindButtonTemplate_OnMouseUp'
|caaaaaa<Locals> self = ud, button = 1, upInside = true </Locals>|r
ZO_Dialog1Button2_MouseUp:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud, button = 1, upInside = true, ctrl = false, alt = false, shift = false, command = false </Locals>|r


Also, Log and Debug can only be both on or both off. Not one or the other. I don't think that's what you intended?
Last edited by Baertram : 07/15/19 at 02:11 PM.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 12:01 PM  
amber1019
 
amber1019's Avatar

Forum posts: 9
File comments: 108
Uploads: 0
Exclamation Still Getting Error

Got this error:

user:/AddOns/AccountSettings/AccountSettings.lua:467: operator .. is not supported for nil .. string
stack traceback:
user:/AddOns/AccountSettings/AccountSettings.lua:467: in function 'AccountSettings:Log'
|caaaaaa<Locals> self = "ffff44", color = "1 0 0" </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:422: in function 'AccountSettings:SaveSettings'
|caaaaaa<Locals> self = tbl, _ = 1, x = 1, _ = 1, y = 0, value = 0 </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:502: in function 'func'
user:/AddOns/VotansFisherman/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua:63: in function 'callback'
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:77: in function 'HandleCallback'
|caaaaaa<Locals> clickedButton = ud, dialog = ud, instanceId = 1 </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:194: in function 'ZO_KeybindButtonMixin:OnClicked'
|caaaaaa<Locals> self = ud, visible = true </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:265: in function 'ZO_KeybindButtonTemplate_OnMouseUp'
|caaaaaa<Locals> self = ud, button = 1, upInside = true </Locals>|r
ZO_Dialog1Button2_MouseUp:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud, button = 1, upInside = true, ctrl = false, alt = false, shift = false, command = false </Locals>|r


Also, Log and Debug can only be both on or both off. Not one or the other. I don't think that's what you intended?
__________________
----------------------------------------------------------
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 09:14 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Originally Posted by yoco007
Thank you for update!
I need to ask, does this only save "options" settings or addons settings as well?
Eso Options/Settings only.

Addons are not that easy as each addon uses different savedvariable names and got several settings on their own to save accountwide, each character, all accounts the same etc.
It depends on each addon and another addon like AccountSettings sneaking in there will most likely break the other addons. It'd be better to implement account wide settings and all accounts the same settings in each addon then trying to copy them with 3rd addons.
Last edited by Baertram : 07/15/19 at 09:18 AM.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 09:03 AM  
yoco007

Forum posts: 3
File comments: 42
Uploads: 0
Thank you for update!
I need to ask, does this only save "options" settings or addons settings as well?
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 09:00 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Oh btw, your APIversion is old: 100026 and shown outdated ingame (stupid check... annoys me as well).
You can specify 2 api versions after another, with a space, if the addon will work on next api as well 8current PTS).
So you could chaneg it to
##APIVersion: 100027 100028
Last edited by Baertram : 07/15/19 at 09:01 AM.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 08:38 AM  
Jodynn
 
Jodynn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 117
Uploads: 9
Originally Posted by Baertram
yw.

Please have a look at my other post below about the libraries as well, especially the removal of LibStub as it is already not needed anymore and will be unsupported in the future.
Done, for each future update of my addons I shall update each one, thank you.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 08:11 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Fixing, thanks for letting me know
yw.

Please have a look at my other post below about the libraries as well, especially the removal of LibStub as it is already not needed anymore and will be unsupported in the future.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 07:08 AM  
Jodynn
 
Jodynn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 117
Uploads: 9
Re: Re: Re: How To Remove Chat Spam?

Originally Posted by amber1019
Originally Posted by Jodynn
Originally Posted by amber1019
Please, please, please tell me how to turn off the chat spam when I use the "save these settings" button.

Example of what I want to be hidden in spoiler:
Warning: Spoiler


Is there something I can edit or add or remove from the addon's lua file to make these messages stop showing in the chat window? Turning off the "log" option in the settings doesn't keep these messages from appearing.
Will get to it tonight, I think I know the issue.

No bug if I leave the log turned off. But, if I turn it back to "ON", i get this error: (check spoiler)
Warning: Spoiler


Also, I like getting the "synced" messages in chat. And now without the log turned on, there's no chat confirmation that the settings have been saved. Could you include a chat response to saving the settings? Something as simple as "Saved." or "Saved account settings." would be fantastic.
including a "log" bool, and a "debug" bool, so you can have the Synced/Saved but also the debug output if you so desire.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 07:07 AM  
Jodynn
 
Jodynn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 117
Uploads: 9
Originally Posted by Baertram
Originally Posted by yoco007
Got this when I click on save
Seems the error happens as the following settings are tried to be saved:
x = SETTING_TYPE_ACTION_BARS -> y=ACTION_BAR_SETTING_LOCK_ACTION_BARS
value=0

In function AccountSettings:SaveSettings() you call the function
Lua Code:
  1. AccountSettings.Log ( tostring( x ) .. " " .. tostring( y ) .. " ".. tostring(value) )
But this function AccountSettings.Log needs 2 parameters. Message and color. And color is missing here!
@author: Add e.g. AccountSettings.OKAY_COLOR, as parameter to the function call.

To fix this until the author is able to repair it:
You could open the file AccountSettings.lua with a text editor, go to line 459 and replace the total function AccountSettings:Log(color, message) from line 459 to line 463 with this code:
Lua Code:
  1. function AccountSettings:Log(color, message)
  2.     if AccountSettings.sv.log then
  3.         if color and message then
  4.             d ( "|c"..color..message.."|r" )
  5.         elseif color and not message then
  6.             d ( color )
  7.         else
  8.             return
  9.         end
  10.     end
  11. end
Fixing, thanks for letting me know
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 07:02 AM  
Jodynn
 
Jodynn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 117
Uploads: 9
Re: request

Originally Posted by Scootworks
thanks for your addon.would be cool to save chat window position and size too
Will look into, thanks for the request.
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 05:08 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Originally Posted by yoco007
Got this when I click on save
Seems the error happens as the following settings are tried to be saved:
x = SETTING_TYPE_ACTION_BARS -> y=ACTION_BAR_SETTING_LOCK_ACTION_BARS
value=0

In function AccountSettings:SaveSettings() you call the function
Lua Code:
  1. AccountSettings.Log ( tostring( x ) .. " " .. tostring( y ) .. " ".. tostring(value) )
But this function AccountSettings.Log needs 2 parameters. Message and color. And color is missing here!
@author: Add e.g. AccountSettings.OKAY_COLOR, as parameter to the function call.

To fix this until the author is able to repair it:
You could open the file AccountSettings.lua with a text editor, go to line 459 and replace the total function AccountSettings:Log(color, message) from line 459 to line 463 with this code:
Lua Code:
  1. function AccountSettings:Log(color, message)
  2.     if AccountSettings.sv.log then
  3.         if color and message then
  4.             d ( "|c"..color..message.."|r" )
  5.         elseif color and not message then
  6.             d ( color )
  7.         else
  8.             return
  9.         end
  10.     end
  11. end
Report comment to moderator  
Reply With Quote
Unread 07/15/19, 04:57 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2194
File comments: 2420
Uploads: 57
Would be good if you remove the embedded libraries folder "lib" totally so LibStub and LibAddonMenu will be not included in old versions anymore and will be loaded from the standalone installed libraries in the "AddOns" folder.
+ you should remove the usage of LibStub as well as it is not needed anymore for LibAddonMenu and LibStub will be gone in the future as the manifest txt files can do the same with ##AddOnVersion: now!

Just change the call to LibAddonMenu to the global variable LibAddonMenu2 instead:
Lua Code:
  1. local LAM = LibAddonMenu2

If you remove the libraries you can make sure they will be loaded for your addon using the manifest txt file and the ##DependsOn: tag like
Code:
##DependsOn: LibAddonMenu-2.0
So you only need to change the ##OptionalDependsOn: tag to ##DependsOn:
and you need to remove these lines from the txt:
Code:
libs/LibStub/LibStub.lua
libs\LibAddonMenu-2.0\LibAddonMenu-2.0.lua
libs\LibAddonMenu-2.0\controls\panel.lua
libs\LibAddonMenu-2.0\controls\submenu.lua
libs\LibAddonMenu-2.0\controls\button.lua
libs\LibAddonMenu-2.0\controls\checkbox.lua
libs\LibAddonMenu-2.0\controls\colorpicker.lua
libs\LibAddonMenu-2.0\controls\custom.lua
libs\LibAddonMenu-2.0\controls\description.lua
libs\LibAddonMenu-2.0\controls\dropdown.lua
libs\LibAddonMenu-2.0\controls\editbox.lua
libs\LibAddonMenu-2.0\controls\header.lua
libs\LibAddonMenu-2.0\controls\slider.lua
libs\LibAddonMenu-2.0\controls\texture.lua
libs\LibAddonMenu-2.0\controls\iconpicker.lua
libs\LibAddonMenu-2.0\controls\divider.lua
Thank you.
Report comment to moderator  
Reply With Quote
Unread 07/14/19, 12:55 AM  
yoco007

Forum posts: 3
File comments: 42
Uploads: 0
Got this when I click on save
user:/AddOns/AccountSettings/AccountSettings.lua:461: operator .. is not supported for nil .. string
stack traceback:
user:/AddOns/AccountSettings/AccountSettings.lua:461: in function 'AccountSettings:Log'
|caaaaaa<Locals> self = "1 0 0" </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:420: in function 'AccountSettings:SaveSettings'
|caaaaaa<Locals> self = tbl, _ = 1, x = 1, _ = 1, y = 0, value = 0 </Locals>|r
user:/AddOns/AccountSettings/AccountSettings.lua:496: in function 'func'
user:/AddOns/BankManagerRevived/Libs/LibAddonMenu-2.0/controls/button.lua:63: in function 'callback'
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:77: in function 'HandleCallback'
|caaaaaa<Locals> clickedButton = ud, dialog = ud, instanceId = 1 </Locals>|r
EsoUI/Libraries/ZO_KeybindButton/ZO_KeybindButton.lua:194: in function 'ZO_KeybindButtonMixin:OnClicked'
|caaaaaa<Locals> self = ud, visible = true </Locals>|r
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:1239: in function 'ZO_Dialogs_HandleButtonForKeybind'
|caaaaaa<Locals> dialog = ud, keybind = "DIALOG_PRIMARY", handledButton = false, i = 1, btn = ud </Locals>|r
EsoUI/Libraries/ZO_Dialog/ZO_Dialog.lua:1251: in function 'ZO_Dialogs_ButtonKeybindPressed'
|caaaaaa<Locals> keybind = "DIALOG_PRIMARY", dialog = ud </Locals>|r
:1: in function '(main chunk)'
|caaaaaa<Locals> keybind = "DIALOG_PRIMARY" </Locals>|r
Report comment to moderator  
Reply With Quote
Unread 07/14/19, 12:37 AM  
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 144
Uploads: 25
request

thanks for your addon.would be cool to save chat window position and size too
__________________
EU Server - SŁĄuGhTerHĜuSe
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: