View Single Post
03/07/21, 11:42 AM   #3
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 655
What I basically use now
lua Code:
  1. function MasterMerchant:Initialize()
  2.   local systemDefault = {
  3.     <<stuff>>
  4.   }
  5.   self.systemSavedVariables = ZO_SavedVars:NewAccountWide('ShopkeeperSavedVars', 1, nil, systemDefault, nil, 'MasterMerchant')
  6.   <<stuff>>
  7. end
The last part is what the previous author put so I can't remove it. It would work the same as.
lua Code:
  1. function MasterMerchant:Initialize()
  2.   local systemDefault = {
  3.     <<stuff>>
  4.   }
  5.   self.systemSavedVariables = ZO_SavedVars:NewAccountWide('ShopkeeperSavedVars', 1, nil, systemDefault)
  6.   <<stuff>>
  7. end

What is odd about what you are sharing, I don't have any issues adding a new value to the systemDefault table. In fact I loop over the table used by the saved vars to remove the old unused values.
  Reply With Quote