'Optimize' Lua error
reaper666735 opened this issue ยท 4 comments
Hello,
just downloaded your addon and when i tried the "Optimize" button i get this Lua error:
1x CovenantMissionHelper\Board.lua:331: attempt to index field '?' (a nil value)
[string "@CovenantMissionHelper\Board.lua"]:331: in function onUnitTakeDamage' [string "@CovenantMissionHelper\Board.lua"]:296: in function
makeUnitAction'
[string "@CovenantMissionHelper\Board.lua"]:161: in function fight' [string "@CovenantMissionHelper\Board.lua"]:142: in function
simulate'
[string "@CovenantMissionHelper\MetaBoard.lua"]:46: in function findBestDisposition' [string "@CovenantMissionHelper\CovenantMissionHelper-0.1.lua"]:55: in function
findBestDisposition'
[string "@CovenantMissionHelper\UI.lua"]:94: in function <CovenantMissionHelper\UI.lua:93>
Locals:
self =
hasRandomSpells = false
initialEnemiesHP = 6920
initialAlliesHP = 4740
units =
}
isEmpty = false
max_rounds = 100
missionID = 2201
isMissionOver = false
isCalcRandom = false
winXP = 1600
baseXP = 400
probability = 100
}
spellID = 11
casterBoardIndex =
isAutoTroop = false
followerGUID = "0x0000000025003044"
role = 1
maxHealth = 1320
spells =
}
boardIndex = 2
untargetable = false
currentHealth = 694
isLoseLvlUp = false
name = "Kleia"
isWinLvlUp = true
ID = 1260
buffs =
}
reflect = 33
attack = 132
}
eventTargetInfo =
oldHealth = 9
boardIndex = 6
points = 33
maxHealth = 2640
newHealth = 0
}
(*temporary) = defined @CovenantMissionHelper\CovenantMissionHelper.lua:154
(*temporary) =
Spell =
}
Buff =
}
Unit =
}
log = defined @CovenantMissionHelper\CovenantMissionHelper.lua:154
debug_log = defined @CovenantMissionHelper\CovenantMissionHelper.lua:159
MetaBoard =
}
TargetManager =
}
DataTables =
}
Board =
}
}
(*temporary) = defined =[C]:-1
(*temporary) = "|cFFFF7700 %s kill %s |r"
(*temporary) = nil
(*temporary) =
1 =
}
}
(*temporary) = defined =[C]:-1
(*temporary) = "attempt to index field '?' (a nil value)"
_have the same issue I think. Night Fae. This is when I select optimize. I also get a lua message when I add my troops. will post that in another comment.
_
Message: Interface\AddOns\CovenantMissionHelper\Board.lua:99: attempt to perform arithmetic on field 'xp' (a nil value)
Time: Sun Jan 24 11:29:00 2021
Count: 3
Stack: Interface\AddOns\CovenantMissionHelper\Board.lua:99: attempt to perform arithmetic on field 'xp' (a nil value)
[string "@interface\AddOns\CovenantMissionHelper\Board.lua"]:99: in function new' [string "@Interface\AddOns\CovenantMissionHelper\MetaBoard.lua"]:35: in function
new'
[string "@interface\AddOns\CovenantMissionHelper\CovenantMissionHelper.lua"]:52: in function `findBestDisposition'
[string "@interface\AddOns\CovenantMissionHelper\UI.lua"]:94: in function <Interface\AddOns\CovenantMissionHelper\UI.lua:93>
Locals: self =
{checkMissionOver = defined @interface\AddOns\CovenantMissionHelper\Board.lua:186
Errors =
}
constructResultString = defined @interface\AddOns\CovenantMissionHelper\Board.lua:382
getTargetIndexes = defined @interface\AddOns\CovenantMissionHelper\Board.lua:410
simulate = defined @interface\AddOns\CovenantMissionHelper\Board.lua:123
onUnitTakeDamage = defined @interface\AddOns\CovenantMissionHelper\Board.lua:328
getTurnOrder = defined @interface\AddOns\CovenantMissionHelper\Board.lua:227
isTargetableUnit = defined @interface\AddOns\CovenantMissionHelper\Board.lua:214
new = defined @interface\AddOns\CovenantMissionHelper\Board.lua:38
makeUnitAction = defined @interface\AddOns\CovenantMissionHelper\Board.lua:253
CombatLogEvents =
}
getTargetableUnits = defined @interface\AddOns\CovenantMissionHelper\Board.lua:218
__index =
}
HiddenCombatLog =
}
getTotalLostHP = defined @interface\AddOns\CovenantMissionHelper\Board.lua:336
isWin = defined @interface\AddOns\CovenantMissionHelper\Board.lua:401
CombatLog =
}
getMyTeam = defined @interface\AddOns\CovenantMissionHelper\Board.lua:353
manageBuffsFromDeadUnits = defined @interface\AddOns\CovenantMissionHelper\Board.lua:316
fight = defined @interface\AddOns\CovenantMissionHelper\Board.lua:145
manageAppliedBuffs = defined @interface\AddOns\CovenantMissionHelper\Board.lua:302
setHasRandomSpells = defined @interface\AddOns\CovenantMissionHelper\Board.lua:169
isUnitAlive = defined @interface\AddOns\CovenantMissionHelper\Board.lua:206
}
missionPage = {
UpdatePortraitPulse = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua:964
EnemyBackground = {
}
missionEffects =
}
0 =
StartMissionFrame = {
}
EmptyString = {
}
CostFrame = {
}
mentorLevel = 0
lastUpdate = 2735.089000
CheckCounter = defined @interface\AddOns\Blizzard_GarrisonTemplates\Blizzard_GarrisonMissionTemplates.lua:2322
GetFollowerFrameFromID = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1384
Median = {
}
CalculateDurabilityLoss = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1432
missionInfo =
}
SetFollowerListSortFuncsForMission = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1356
mentorItemLevel = 0
AddFollower = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua:948
StartMissionButton = {
}
NineSlice = {
}
Board = {
}
FollowerBackground = {
}
SetCounters = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1352
ItemLevelHitboxFrame = {
}
GenerateSuccessTooltip = defined @interface\AddOns\Blizzard_GarrisonTemplates\Blizzard_GarrisonMissionTemplates.lua:2318
BoardDropShadow = {
}
CloseButton = {
}
IconBG = <unna
Not sure if the same message, but this is when I add a troop (or take them away)
Message: Interface\AddOns\CovenantMissionHelper\Board.lua:99: attempt to perform arithmetic on field 'xp' (a nil value)
Time: Sun Jan 24 11:33:26 2021
Count: 5
Stack: Interface\AddOns\CovenantMissionHelper\Board.lua:99: attempt to perform arithmetic on field 'xp' (a nil value)
[string "@interface\AddOns\CovenantMissionHelper\Board.lua"]:99: in function new' [string "@Interface\AddOns\CovenantMissionHelper\CovenantMissionHelper.lua"]:29: in function <...dOns\CovenantMissionHelper\CovenantMissionHelper.lua:25> [string "@Interface\AddOns\CovenantMissionHelper\CovenantMissionHelper.lua"]:37: in function
simulateFight'
[string "@interface\AddOns\CovenantMissionHelper\CovenantMissionHelper.lua"]:20: in function <...dOns\CovenantMissionHelper\CovenantMissionHelper.lua:15>
[string "=[C]"]: in function UpdateAllyPower' [string "@Interface\AddOns\Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua"]:647: in function
AssignFollowerToMission'
[string "@interface\AddOns\Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua"]:472: in function ptr' [string "@Interface\SharedXML\CallbackRegistry.lua"]:55: in function
TriggerEvent'
[string "@interface\AddOns\Blizzard_GarrisonUI\Blizzard_AdventuresPuck.lua"]:426: in function <...dOns\Blizzard_GarrisonUI\Blizzard_AdventuresPuck.lua:423>
Locals: self =
{checkMissionOver = defined @interface\AddOns\CovenantMissionHelper\Board.lua:186
Errors =
}
constructResultString = defined @interface\AddOns\CovenantMissionHelper\Board.lua:382
getTargetIndexes = defined @interface\AddOns\CovenantMissionHelper\Board.lua:410
simulate = defined @interface\AddOns\CovenantMissionHelper\Board.lua:123
onUnitTakeDamage = defined @interface\AddOns\CovenantMissionHelper\Board.lua:328
getTurnOrder = defined @interface\AddOns\CovenantMissionHelper\Board.lua:227
isTargetableUnit = defined @interface\AddOns\CovenantMissionHelper\Board.lua:214
new = defined @interface\AddOns\CovenantMissionHelper\Board.lua:38
makeUnitAction = defined @interface\AddOns\CovenantMissionHelper\Board.lua:253
CombatLogEvents =
}
getTargetableUnits = defined @interface\AddOns\CovenantMissionHelper\Board.lua:218
__index =
}
HiddenCombatLog =
}
getTotalLostHP = defined @interface\AddOns\CovenantMissionHelper\Board.lua:336
isWin = defined @interface\AddOns\CovenantMissionHelper\Board.lua:401
CombatLog =
}
getMyTeam = defined @interface\AddOns\CovenantMissionHelper\Board.lua:353
manageBuffsFromDeadUnits = defined @interface\AddOns\CovenantMissionHelper\Board.lua:316
fight = defined @interface\AddOns\CovenantMissionHelper\Board.lua:145
manageAppliedBuffs = defined @interface\AddOns\CovenantMissionHelper\Board.lua:302
setHasRandomSpells = defined @interface\AddOns\CovenantMissionHelper\Board.lua:169
isUnitAlive = defined @interface\AddOns\CovenantMissionHelper\Board.lua:206
}
missionPage = {
UpdatePortraitPulse = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua:964
EnemyBackground = {
}
missionEffects =
}
0 =
StartMissionFrame = {
}
EmptyString = {
}
CostFrame = {
}
mentorLevel = 0
lastUpdate = 3191.907000
CheckCounter = defined @interface\AddOns\Blizzard_GarrisonTemplates\Blizzard_GarrisonMissionTemplates.lua:2322
GetFollowerFrameFromID = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1384
Median = {
}
CalculateDurabilityLoss = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1432
missionInfo =
}
SetFollowerListSortFuncsForMission = defined @interface\AddOns\Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1356
mentorIte
another bug when you use "Troops" in the battle
4x CovenantMissionHelper\Board.lua:99: attempt to perform arithmetic on field 'xp' (a nil value)
[string "@CovenantMissionHelper\Board.lua"]:99: in function new' [string "@CovenantMissionHelper\CovenantMissionHelper-0.1.lua"]:29: in function <...dOns\CovenantMissionHelper\CovenantMissionHelper.lua:25> [string "@CovenantMissionHelper\CovenantMissionHelper-0.1.lua"]:37: in function
simulateFight'
[string "@CovenantMissionHelper\CovenantMissionHelper-0.1.lua"]:20: in function <...dOns\CovenantMissionHelper\CovenantMissionHelper.lua:15>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function UpdateAllyPower' [string "@Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua"]:647: in function
AssignFollowerToMission'
[string "@Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua"]:472: in function ptr' [string "@SharedXML\CallbackRegistry.lua"]:55: in function
TriggerEvent'
[string "@Blizzard_GarrisonUI\Blizzard_AdventuresPuck.lua"]:426: in function <...dOns\Blizzard_GarrisonUI\Blizzard_AdventuresPuck.lua:423>
Locals:
self =
checkMissionOver = defined @CovenantMissionHelper\Board.lua:186
Errors =
}
constructResultString = defined @CovenantMissionHelper\Board.lua:382
getTargetIndexes = defined @CovenantMissionHelper\Board.lua:410
simulate = defined @CovenantMissionHelper\Board.lua:123
onUnitTakeDamage = defined @CovenantMissionHelper\Board.lua:328
getTurnOrder = defined @CovenantMissionHelper\Board.lua:227
isTargetableUnit = defined @CovenantMissionHelper\Board.lua:214
new = defined @CovenantMissionHelper\Board.lua:38
makeUnitAction = defined @CovenantMissionHelper\Board.lua:253
CombatLogEvents =
}
getTargetableUnits = defined @CovenantMissionHelper\Board.lua:218
__index =
}
HiddenCombatLog =
}
getTotalLostHP = defined @CovenantMissionHelper\Board.lua:336
isWin = defined @CovenantMissionHelper\Board.lua:401
CombatLog =
}
getMyTeam = defined @CovenantMissionHelper\Board.lua:353
manageBuffsFromDeadUnits = defined @CovenantMissionHelper\Board.lua:316
fight = defined @CovenantMissionHelper\Board.lua:145
manageAppliedBuffs = defined @CovenantMissionHelper\Board.lua:302
setHasRandomSpells = defined @CovenantMissionHelper\Board.lua:169
isUnitAlive = defined @CovenantMissionHelper\Board.lua:206
}
missionPage = {
EncounterIcon = {
}
StartMissionFrame = {
}
CostFrame = {
}
mentorLevel = 0
StartMissionButton = {
}
SetFollowerListSortFuncsForMission = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1356
mentorItemLevel = 0
FollowerBackground = {
}
IconBG = {
}
Stage = {
}
UpdateFollowerModel = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1361
missionEffects =
}
lastUpdate = 8327.086000
EmptyString = {
}
GetFollowerFrameFromID = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1384
CalculateDurabilityLoss = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1432
EnemyBackground = {
}
missionInfo =
}
UpdatePortraitPulse = defined @Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua:964
UpdateEmptyString = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1376
Board = {
}
SetCounters = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1352
0 =
CheckCounter = defined @Blizzard_GarrisonTemplates\Blizzard_GarrisonMissionTemplates.lua:2322
BoardDropShadow = {
}
CloseButton = {
}
NineSlice = {
}
AddFollower = defined @Blizzard_GarrisonUI\Blizzard_CovenantMissionUI.lua:948
UpdateFollowerDurability = defined @Blizzard_GarrisonUI\Blizzard_GarrisonMissionUI.lua:1442
ItemLevelHitboxFrame = {
}
GenerateSuccessTooltip = defined @Blizzard_GarrisonTemplates\Blizzard_GarrisonMissionTemplates.lua:2318
Median = {
}
}
isCalcRandom = false
newObj =
hasRandomSpells = false
initialEnemiesHP = 1392
isEmpty = true
units =
}
initialAlliesHP = 0
max_rounds = 100
missionID = 2168
baseXP = 100
isCalcRandom = false
winXP = 100
isMissionOver = false
probability = 100
}
isCompletedMission = false
missionInfo =
description = "The problem has gotten even
Fixed in v3.0.1 #18