coa.18: guard DataStore_Achievements nil criteria quantity
release / release (push) Successful in 5s

GetAchievementCriteriaInfo returns nil reqQuantity/quantity for some CoA achievements;
'reqQuantity > 1' crashed. Guarded both.
This commit is contained in:
2026-05-29 20:05:03 +02:00
parent 0a56cbe560
commit 219e749046
2 changed files with 3 additions and 3 deletions
@@ -55,8 +55,8 @@ local function ScanSingleAchievement(id, isCompleted, month, day, year)
if critCompleted then
table.insert(CriteriaCache, tostring(j))
else
if reqQuantity > 1 then
table.insert(CriteriaCache, j .. ":" .. quantity)
if (reqQuantity or 0) > 1 then -- CoA: GetAchievementCriteriaInfo can return nil quantities for custom/partial achievements
table.insert(CriteriaCache, j .. ":" .. (quantity or 0))
end
end
end