[outdated] GetNewSavedVars() mishandled optional namespace argument
Code:
ZO_SavedVars:New("TestSV",1,{},"TestProfile"); EsoUI\Libraries\Utility\ZO_SavedVars.lua:143 Code:
if defaults == nil and type(namespace) == "table" then Code:
if profile == nil and type(namespace) == "table" then Preferably, there shouldn't be a check for nil there anyway since the following code block handles rearranging the arguments into the correct places. Stopping this from happening causes this error in the first place. The down side to removing this check? You ignore a value that should be discarded anyway. |
Maybe I got you wrong but you tried to use namespace as an "optional argument". So why don't you just put nil in the correct place as you call the function?
Lua Code:
Edit: Oh sorry just saw the lines 142ff in the sourcecode and now I understood what you are up to Lua Code:
Here are the prameters of the function GetNewSavedVars from the live server: Lua Code:
Parameters of ZO_SavedVars:New() Lua Code:
If you use ZO_SavedVars:New from your example: Lua Code:
savedVariableTable: "TestSV" version: 1 namespace: {} defaults: "TestProfile" profile: nil |
The syntax is also noted near the top of the file as:
Code:
local sv = ZO_SavedVars:New(savedVariableTable, version, [, namespace], defaults [, profile]) |
All times are GMT -6. The time now is 08:55 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI