Pet Battle Script bug
rambutanMan opened this issue ยท 5 comments
43x tdBattlePetScript/Rematch/Addon.lua:214: attempt to index field '?' (a function value)
[string "@tdBattlePetScript/Rematch/Addon.lua"]:214: in function GetTitleByKey' [string "@tdBattlePetScript/UI/Import.lua"]:265: in function
menuTable'
[string "@tdBattlePetScript/Libs/tdGUI/Widget/Dropdown.lua"]:124: in function <...Ons/tdBattlePetScript/Libs/tdGUI/Widget/Dropdown.lua:120>
[string "=[C]"]: in function `Click'
[string "@tdBattlePetScript/Libs/tdGUI/Widget/Dropdown.lua"]:41: in function <...Ons/tdBattlePetScript/Libs/tdGUI/Widget/Dropdown.lua:40>
Locals:
self =
SetDefaultModuleLibraries = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:363
UnhookAll = defined @EasyFrames/Libs/AceHook-3.0/AceHook-3.0.lua:476
Enable = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:290
NewModule = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:231
SecureHookScript = defined @EasyFrames/Libs/AceHook-3.0/AceHook-3.0.lua:409
EnableModule = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:328
modules =
}
GetModule = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:206
IterateEmbeds = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:438
_icon = "Interface\AddOns\Rematch\Textures\icon"
SecureHook = defined @EasyFrames/Libs/AceHook-3.0/AceHook-3.0.lua:335
defaultModuleLibraries =
}
hooks =
}
_title = "Rematch"
baseName = "tdBattlePetScript"
RawHookScript = defined @EasyFrames/Libs/AceHook-3.0/AceHook-3.0.lua:394
TeardownUI = defined @tdBattlePetScript/Rematch/UI.lua:212
SendMessage = defined @Bazooka/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
UpdateDBRematch4To5 = defined @tdBattlePetScript/Rematch/Addon.lua:325
ResetEverything = defined @tdBattlePetScript/Rematch/Addon.lua:318
SetDefaultModulePrototype = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:405
OnImportContinuation = defined @tdBattlePetScript/Rematch/Addon.lua:305
OnImport = defined @tdBattlePetScript/Rematch/Addon.lua:284
OnExport = defined @tdBattlePetScript/Rematch/Addon.lua:267
name = "PetBattleScripts_PluginManager_Rematch"
OnExportImpl = defined @tdBattlePetScript/Rematch/Addon.lua:256
IsEnabled = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:447
orderedModules =
}
OnTooltipFormatting = defined @tdBattlePetScript/Rematch/Addon.lua:220
DisableModule = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:346
NewClass = defined @tdBattlePetScript/Libs/tdGUI/Libs/LibClass-2.0/Class-2.0.lua:349
GetTitleByKey = defined @tdBattlePetScript/Rematch/Addon.lua:210
IterateKeys = defined @tdBattlePetScript/Rematch/Addon.lua:196
GetCurrentKey = defined @tdBattlePetScript/Rematch/Addon.lua:186
RegisterMessage = defined @Bazooka/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Bazooka/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
OnDisable = defined @tdBattlePetScript/Rematch/Addon.lua:167
OnEnable = defined @tdBattlePetScript/Rematch/Addon.lua:25
IsHooked = defined @EasyFrames/Libs/AceHook-3.0/AceHook-3.0.lua:492
OnInitialize = defined @tdBattlePetScript/Rematch/Addon.lua:14
GetClass = defined @tdBattlePetScript/Libs/tdGUI/Libs/LibClass-2.0/Class-2.0.lua:359
IsModule = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:213
_notes = "This script selector will be bound to the Rematch team."
SetDefaultModuleState = defined @Bazooka/libs/Ace3/AceAddon-3.0/AceAddon-3.0.lua:383
SetupUI = defined @tdBattlePetScript/Rematch/UI.lua:49
updateFrames = defined @tdBattlePetScript/Rematch/UI.lua:64
SetEnabledStat
You're the first person I know to use the import/export functions, congratulations
It appears there is inconsistency between rematch and your scripts. this really shouldn't happen, but we seem to not properly detect the situation. To confirm this, can you please attach the saved variables for both addons? You can find them at wow/WTF/Account/<your account>/SavedVariables/tdBattlePetScript.lua
and .../Rematch.lua
respectively.
I haven't tested their profile, but after looking into it, it appears to be the RematchPlugin:IterateKeys
method. PBS is looping over the Rematch.savedTeams
table but it's only returning the methods on that table and not the teams. Probably because Rematch uses a metatable __index
method to return the teams. They do have a iterator Rematch.savedTeams:AllTeams()
which can be used.