Some recipes throw an error in StatweightCalculation.lua:93
Znuff opened this issue ยท 2 comments
Trace:
1x CraftSim/StatweightCalculation.lua:93: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function `pairs'
[string "@CraftSim/StatweightCalculation.lua"]:93: in function `GetExpectedQualityBySkill'
[string "@CraftSim/Frames.lua"]:1345: in function `UpdateSimModeStatDetails'
[string "@CraftSim/SimMode.lua"]:95: in function `InitSimModeData'
[string "@CraftSim/CraftSim.lua"]:343: in function `TriggerModulesByRecipeType'
[string "@CraftSim/CraftSim.lua"]:100: in function <CraftSim/CraftSim.lua:99>
Recipe: https://www.wowhead.com/spell=376564/fiddle-with-khazgorite-fabric-cutters
Checking for thresholds
before should fix it:
if thresholds then
for _, threshold in pairs(thresholds) do
if skill > threshold then
expectedQuality = expectedQuality + 1
end
end
end