Minty23185Fresh
September 28th, 2017, 22:47
This comes from the 5E ruleset file: 5E\campaign\scripts\power_page.lua, approximately lines 211-225, in the updatePowerGroups() function:
-- Determine all the groups accounted for by current powers
local aPowerGroups = {};
for _,nodePower in pairs(DB.getChildren(getDatabaseNode(), "powers")) do
local sGroup = DB.getValue(nodePower, "group", "");
if sGroup ~= "" then
aPowerGroups[sGroup] = true;
end
end
-- Remove the groups that already exist
for _,vGroup in pairs(aGroups) do
if aPowerGroups[sGroup] then
aPowerGroups[sGroup] = nil;
end
end
My issue is with the sGroup index used in lines 222 and 223. Shouldn't the index be vGroup? sGroup is local to the for loop above in lines 214-216.
-- Determine all the groups accounted for by current powers
local aPowerGroups = {};
for _,nodePower in pairs(DB.getChildren(getDatabaseNode(), "powers")) do
local sGroup = DB.getValue(nodePower, "group", "");
if sGroup ~= "" then
aPowerGroups[sGroup] = true;
end
end
-- Remove the groups that already exist
for _,vGroup in pairs(aGroups) do
if aPowerGroups[sGroup] then
aPowerGroups[sGroup] = nil;
end
end
My issue is with the sGroup index used in lines 222 and 223. Shouldn't the index be vGroup? sGroup is local to the for loop above in lines 214-216.