attempt to index field '?' on load
chadrien opened this issue ยท 1 comments
Environment
- BeStride version: 2.0.0-beta2
- WoW version: Wrath classic
Steps to reproduce
Install the addon and load a character
Expected Behaviour
No lua error
Actual Behaviour
Lua error on load
Debug Output
Message: ...erface\AddOns\BeStride\Versions\Wrath\MountTable.lua:23: attempt to index field '?' (a nil value)
Time: Sun Oct 2 02:04:52 2022
Count: 1
Stack: ...erface\AddOns\BeStride\Versions\Wrath\MountTable.lua:23: attempt to index field '?' (a nil value)
[string "=(tail call)"]: ?
[string "@Interface\AddOns\BeStride\Versions\Wrath\MountTable.lua"]:23: in function `AddNewMount'
[string "@Interface\AddOns\BeStride\Versions\Wrath\MountTable.lua"]:8: in function `BuildMasterMountTable'
[string "@Interface\AddOns\BeStride\BeStride.lua"]:378: in function `buildMountTables'
[string "@Interface\AddOns\BeStride\BeStride.lua"]:97: in function <Interface\AddOns\BeStride\BeStride.lua:96>
[string "=[C]"]: ?
[string "@Interface\AddOns\Details\Libs\AceAddon-3.0\AceAddon-3.0.lua"]:70: in function <...ce\AddOns\Details\Libs\AceAddon-3.0\AceAddon-3.0.lua:65>
[string "@Interface\AddOns\Details\Libs\AceAddon-3.0\AceAddon-3.0.lua"]:527: in function `EnableAddon'
[string "@Interface\AddOns\Details\Libs\AceAddon-3.0\AceAddon-3.0.lua"]:630: in function <...ce\AddOns\Details\Libs\AceAddon-3.0\AceAddon-3.0.lua:615>
Locals: <none>
Bestride Variables
Expand
Version = 2.0.0
maps = {
1 = {
mapType = 4,
mapID = 125,
name = Dalaran,
parentMapID = 113,
},
2 = {
mapType = 2,
mapID = 113,
name = Northrend,
parentMapID = 947,
},
3 = {
mapType = 1,
mapID = 947,
name = Azeroth,
parentMapID = 946,
},
4 = {
mapType = 0,
mapID = 946,
name = Cosmic,
parentMapID = 0,
},
}
mountTable = {
repair = {
},
master = {
14565 = {
type = ground,
name = Charger,
mountID = 14565,
icon = 132226,
isActive = false,
spellID = 23214,
},
24379 = {
type = ground,
name = Amani War Bear,
mountID = 24379,
icon = 132117,
isActive = false,
spellID = 43688,
},
22513 = {
type = ground,
name = Tan Riding Talbuk,
mountID = 22513,
icon = 134060,
isActive = false,
spellID = 39318,
},
18357 = {
type = flying,
name = Ebon Gryphon,
mountID = 18357,
icon = 294467,
isActive = false,
spellID = 32239,
},
18406 = {
type = flying,
name = Swift Blue Gryphon,
mountID = 18406,
icon = 132239,
isActive = false,
spellID = 32242,
},
20150 = {
type = ground,
name = Tan War Talbuk,
mountID = 20150,
icon = 134060,
isActive = false,
spellID = 34899,
},
24654 = {
type = flying,
name = Turbo-Charged Flying Machine,
mountID = 24654,
icon = 132241,
isActive = false,
spellID = 44151,
},
32203 = {
type = ground,
name = Black War Bear,
mountID = 32203,
icon = 236243,
isActive = true,
spellID = 60118,
},
20072 = {
type = ground,
name = Cobalt War Talbuk,
mountID = 20072,
icon = 134060,
isActive = false,
spellID = 34896,
},
20152 = {
type = ground,
name = Silver War Talbuk,
mountID = 20152,
icon = 134060,
isActive = false,
spellID = 34898,
},
22510 = {
type = ground,
name = Cobalt Riding Talbuk,
mountID = 22510,
icon = 134060,
isActive = false,
spellID = 39315,
},
22512 = {
type = ground,
name = Silver Riding Talbuk,
mountID = 22512,
icon = 134060,
isActive = false,
spellID = 39317,
},
176708 = {
type = ground,
name = Reawakened Phase-Hunter,
mountID = 176708,
icon = 3940790,
isActive = false,
spellID = 348459,
},
31717 = {
type = flying,
name = Bronze Drake Mount,
mountID = 31717,
icon = 236232,
isActive = false,
spellID = 59569,
},
23455 = {
type = flying,
name = Onyx Netherwing Drake,
mountID = 23455,
icon = 132250,
isActive = false,
spellID = 41513,
},
},
zone = {
},
passenger = {
},
flying = {
},
ground = {
},
swimming = {
},
}
BeStride.db.profile = {
settings = {
classes = {
deathknight = {
wraithwalk = true,
},
demonhunter = {
felrush = true,
glide = true,
},
shaman = {
ghostwolf = true,
},
monk = {
roll = true,
zenflight = true,
},
rogue = {
sprint = true,
},
mage = {
blink = true,
slowfall = true,
blinkpriority = true,
},
druid = {
flightform = true,
traveltotravel = false,
mountedtoflightform = false,
flightformpriority = false,
},
priest = {
levitate = true,
},
hunter = {
aspectofthecheetah = false,
},
paladin = {
steed = true,
},
},
mount = {
repair = {
durability = 20,
globaldurability = 20,
force = false,
inventorydurability = 5,
use = false,
},
nodismountwhileflying = false,
emptyrandom = true,
hasmount = false,
forceflyingmount = false,
enablenew = true,
flyingbroom = false,
noswimming = false,
telaari = true,
useflyingmount = false,
remount = false,
prioritizepassenger = false,
forcerobot = false,
},
ymBindingsMigrated = true,
bindingsMigrated = true,
migrated = true,
},
mounts = {
repair = {
},
flying = {
31717 = true,
18357 = false,
23455 = true,
18406 = false,
24654 = true,
},
zone = {
aq = {
},
},
passenger = {
},
ground = {
14565 = true,
24379 = true,
22512 = false,
20150 = false,
32203 = true,
20072 = true,
20151 = false,
22510 = false,
22514 = false,
22513 = false,
20152 = false,
176708 = false,
},
swimming = {
},
},
}
BeStride_Variables = {
Settings = {
Mount = {
1 = {
label = Automatically enable new mounts upon learning them,
name = mount.enablenew,
element = CheckBox,
},
2 = {
label = Remount Immediately After Dismounting,
name = mount.remount,
element = CheckBox,
},
3 = {
label = Choose random usable mount if no usable mounts selected,
name = mount.emptyrandom,
element = CheckBox,
},
4 = {
label = Don't dismount while flying. You'll have to land or (if enabled in Blizzard options) cast a spell,
name = mount.nodismountwhileflying,
element = CheckBox,
},
5 = {
label = Use Flying type mounts even in areas where you cannot fly,
dependants = {
1 = mount.forceflyingmount,
},
name = mount.useflyingmount,
element = CheckBox,
},
6 = {
depends = {
1 = mount.useflyingmount,
},
label = Force Flying type mounts even in areas where you cannot fly,
name = mount.forceflyingmount,
element = CheckBox,
},
7 = {
label = Prioritize Passenger Mounts when in group,
name = mount.prioritizepassenger,
element = CheckBox,
},
8 = {
label = Never use underwater mounts even when swimming,
name = mount.noswimming,
element = CheckBox,
},
9 = {
label = Always use Flying Broom instead of a normal mount,
name = mount.flyingbroom,
element = CheckBox,
},
10 = {
label = Always use the Telaari Talbuk or Frostwolf War Wolf while in Nagrand,
name = mount.telaari,
element = CheckBox,
},
11 = {
label = Always use Sky Golem or Mechanized Lumber Extractor when you have learned Herbalism,
name = mount.forcerobot,
element = CheckBox,
},
12 = {
children = {
1 = {
label = Use a Repair mount if player owns one and if meets durability threshold,
dependants = {
1 = mount.repair.force,
2 = mount.repair.durability,
3 = mount.repair.globaldurability,
4 = mount.repair.inventorydurability,
},
name = mount.repair.use,
element = CheckBox,
},
2 = {
depends = {
1 = mount.repair.use,
},
label = Force a Repair mount if player owns one,
name = mount.repair.force,
element = CheckBox,
},
3 = {
minDurability = 0,
name = mount.repair.durability,
label = Item Low Durability %,
increment = 5,
maxDurability = 100,
depends = {
1 = mount.repair.use,
},
element = Slider,
},
4 = {
minDurability = 0,
name = mount.repair.globaldurability,
label = Global Low Durability %,
increment = 5,
maxDurability = 100,
depends = {
1 = mount.repair.use,
},
element = Slider,
},
5 = {
minDurability = 0,
name = mount.repair.inventorydurability,
label = Inventory Item Low Durability %,
increment = 5,
maxDurability = 100,
depends = {
1 = mount.repair.use,
},
element = Slider,
},
},
element = Group,
},
},
Classes = {
1 = {
1 = {
label = Death Knight: Wraith Walk,
class = deathknight,
name = classes.deathknight.wraithwalk,
element = CheckBox,
},
},
2 = {
1 = {
label = Demon Hunter: Use Fel Rush,
class = demonhunter,
name = classes.demonhunter.felrush,
element = CheckBox,
},
2 = {
label = Demon Hunter: Use Gliding,
class = demonhunter,
name = classes.demonhunter.glide,
element = CheckBox,
},
},
3 = {
1 = {
name = classes.druid.flightform,
label = Druid: Use Flight Form,
class = druid,
dependants = {
1 = classes.druid.traveltotravel,
2 = classes.druid.flightformpriority,
3 = classes.druid.mountedtoflightform,
},
element = CheckBox,
},
2 = {
name = classes.druid.traveltotravel,
label = Druid: When in combat, shift from Travel or Aquatic form directly back to that form,
class = druid,
depends = {
1 = classes.druid.flightform,
},
element = CheckBox,
},
3 = {
name = classes.druid.flightformpriority,
label = Druid: Prioritize using Flight Form over a regular mount even when not moving,
class = druid,
depends = {
1 = classes.druid.flightform,
},
element = CheckBox,
},
4 = {
name = classes.druid.mountedtoflightform,
label = Druid: When on a flying mount and flying + moving, shift into Flight Form,
class = druid,
depends = {
1 = classes.druid.flightform,
},
element = CheckBox,
},
},
4 = {
1 = {
label = Hunter: Aspect of the Cheetah,
class = hunter,
name = classes.hunter.aspectofthecheetah,
element = CheckBox,
},
},
5 = {
1 = {
label = Mage: Slowfall,
class = mage,
name = classes.mage.slowfall,
element = CheckBox,
},
2 = {
label = Mage: Blink,
class = mage,
name = classes.mage.blink,
element = CheckBox,
},
3 = {
label = Mage: Prioritize Blink before Slowfall (even when falling),
class = mage,
name = classes.mage.blinkpriority,
element = CheckBox,
},
},
6 = {
1 = {
label = Monk: Roll,
class = monk,
name = classes.monk.roll,
element = CheckBox,
},
2 = {
label = Monk: Use Zen Flight while moving or falling,
class = monk,
name = classes.monk.zenflight,
element = CheckBox,
},
},
7 = {
1 = {
label = Paladin: Divine Steed,
class = paladin,
name = classes.paladin.steed,
element = CheckBox,
},
},
8 = {
1 = {
label = Priest: Levitate,
class = priest,
name = classes.priest.levitate,
element = CheckBox,
},
},
9 = {
1 = {
label = Rogue: Sprint,
class = rogue,
name = classes.rogue.sprint,
element = CheckBox,
},
},
10 = {
1 = {
label = Shaman: Ghost Wolf,
class = shaman,
name = classes.shaman.ghostwolf,
element = CheckBox,
},
},
},
},
}
BeStride_Constants = {
map = {
dungeon = 4,
orphan = 6,
zone = 3,
continent = 2,
cosmic = 0,
micro = 5,
world = 1,
},
Zone = {
Vashjir = {
id = 203,
KelptharForest = {
id = 201,
},
AbyssalDepths = {
id = 204,
},
ShimmeringExpanse = {
id = 205,
},
},
},
Mount = {
Mounts = {
75207 = {
zone = Vash'jir,
type = zone,
subtype = swimming,
mountID = 373,
},
61465 = {
repair = false,
type = passenger,
name = Grand Black War Mammoth,
subtype = ground,
},
61467 = {
repair = false,
type = passenger,
name = Grand Black War Mammoth,
subtype = ground,
},
26054 = {
type = zone,
name = Red Qiraji Battle Tank,
zone = taq,
},
61470 = {
repair = false,
type = passenger,
name = Grand Ice Mammoth,
subtype = ground,
},
26055 = {
type = zone,
name = Yellow Qiraji Battle Tank,
zone = taq,
},
245725 = {
repair = false,
type = passenger,
name = Orgrimmar Interceptor,
subtype = flying,
},
26056 = {
type = zone,
name = Green Qiraji Battle Tank,
zone = taq,
},
264058 = {
repair = true,
type = passenger,
name = Mighty Caravan Brutosaur,
subtype = ground,
},
60424 = {
repair = false,
type = passenger,
name = Mekgineer's Chopper,
subtype = ground,
},
122708 = {
repair = true,
type = passenger,
name = Grand Expedition Yak,
subtype = ground,
},
373 = {
zones = {
1 = 203,
},
zone = 203,
},
93326 = {
repair = false,
type = passenger,
name = Sandstone Drake,
subtype = flying,
},
55531 = {
repair = false,
type = passenger,
name = Mechano-Hog,
subtype = ground,
},
25953 = {
type = zone,
name = Blue Qiraji Battle Tank,
zone = taq,
},
245723 = {
repair = false,
type = passenger,
name = Stormwind Skychaser,
subtype = flying,
},
121820 = {
repair = false,
type = passenger,
name = Obsidian Nightwing,
subtype = flying,
},
61425 = {
repair = true,
type = passenger,
name = Traveler's Tundra Mammoth,
subtype = ground,
},
75973 = {
repair = false,
type = passenger,
name = X-53 Touring Rocket,
subtype = flying,
},
61469 = {
repair = false,
type = passenger,
name = Grand Ice Mammoth,
subtype = ground,
},
61447 = {
repair = true,
type = passenger,
name = Traveler's Tundra Mammoth,
subtype = ground,
},
},
Types = {
230 = ground,
231 = swimming,
254 = swimming,
232 = zone,
269 = ground,
248 = flying,
241 = zone,
284 = chauffeured,
242 = dead,
270 = flying,
247 = flying,
},
},
spells = {
hunter = {
aspectofthecheetah = 186257,
},
druid = {
flightform = 783,
aquaticform = 783,
catform = 783,
travelform = 783,
},
},
Riding = {
Skill = {
90267 = {
unlocks = flying,
name = Flight Master's License,
active = true,
},
233368 = {
zones = {
1 = ,
},
unlocks = flying,
name = Broken Isles Pathfinder,
},
33391 = {
depends = 33388,
level = 150,
name = Journeyman Riding,
active = true,
},
54197 = {
zones = {
1 = ,
},
unlocks = flying,
name = Cold Weather Flying,
active = false,
},
34090 = {
unlocks = flying,
name = Expert Riding,
active = true,
level = 225,
depends = 33391,
},
226342 = {
name = Broken Isles Pathfinder,
},
34091 = {
depends = 34090,
level = 300,
name = Artisan Riding,
active = true,
},
281576 = {
level = 825,
name = Battle for Azeroth Pathfinder,
depends = 34090,
},
115913 = {
zones = {
1 = ,
},
unlocks = flying,
name = Wisdom of the Four Winds,
active = false,
},
278833 = {
zones = {
1 = ,
},
unlocks = flying,
name = Battle for Azeroth Pathfinder,
},
33388 = {
level = 75,
unlocks = ground,
name = Apprentice Riding,
active = true,
},
191645 = {
zones = {
1 = ,
},
unlocks = flying,
name = Draenor Pathfinder,
},
90265 = {
depends = 34091,
level = 375,
name = Master Riding,
active = true,
},
},
Flight = {
Restricted = {
Worlds = {
},
Continents = {
905 = {
blocked = true,
},
876 = {
requires = 278833,
},
875 = {
requires = 278833,
},
},
Zones = {
106 = {
blocked = true,
},
94 = {
blocked = true,
},
103 = {
blocked = true,
},
1355 = {
requires = 278833,
},
95 = {
blocked = true,
},
97 = {
blocked = true,
},
122 = {
blocked = true,
},
},
},
},
},
}
Local quick fix:
function BeStride:AddNewMount(mountId)
local mountID,name,spellID,icon,isSummoned = GetCompanionInfo("MOUNT", mountId)
-- print("" .. name .. ":" .. mountID .. ":" .. spellID .. "" .. BeStride_MountDB[spellID][7])
if not BeStride_MountDB[spellID] then
return
end
-- rest of the function
end
BeStride/Versions/Wrath/MountTable.lua
Line 23 in 8e58907
Could you double check and give me the exact line?