Spawnframes.lua bad argument #1 to 'match' (string expected, got nil)
Crystalinn opened this issue ยท 1 comments
This error showed up upon creating a party via the group finder.
Via Bugsack:
2x SpartanUI\modules\UnitFrames\SpawnFrames.lua:235: bad argument #1 to 'match' (string expected, got nil)
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@FrameXML\RestrictedFrames.lua"]:673: in function <FrameXML\RestrictedFrames.lua:672>
[string "@FrameXML\RestrictedFrames.lua"]:811: in function `CallMethod'
[string " local header = self:GetParent()
local frames = table.new()
table.insert(frames, self)
self:GetChildList(frames)
for i = 1, #frames do
local frame = frames[i]
local unit
-- There's no need to do anything on frames with onlyProcessChildren
if(not frame:GetAttribute('oUF-onlyProcessChildren')) then
RegisterUnitWatch(frame)
-- Attempt to guess what the header is set to spawn.
local groupFilter = header:GetAttribute('groupFilter')
if(type(groupFilter) == 'string' and groupFilter:match('MAIN[AT]')) then
local role = groupFilter:match('MAIN([AT])')
if(role == 'T') then
unit = 'maintank'
else
unit = 'mainassist'
end
elseif(header:GetAttribute('showRaid')) then
unit = 'raid'
elseif(header:GetAttribute('showParty')) then
unit = 'party'
end
local headerType = header:GetAttribute('oUF-headerType')
local suffix = frame:GetAttribute('unitsuffix')
if(unit and suffix) then
if(headerType == 'pet' and suffix == 'target') then
unit = unit .. headerType .. suffix
else
unit = unit .. suffix
end
elseif(unit and headerType == 'pet') then
unit = unit .. headerType
end
frame:SetAttribute('*type1', 'target')
frame:SetAttribute('*type2', 'togglemenu')
frame:SetAttribute('oUF-guessUnit', unit)
end
local body = header:GetAttribute('oUF-initialConfigFunction')
if(body) then
frame:Run(body, unit)
end
end
header:CallMethod('styleFunction', self:GetName())
local clique = header:GetFrameRef('clickcast_header')
if(clique) then
clique:SetAttribute('clickcast_button', self)
clique:RunAttribute('clickcast_register')
end
"]:51: in function <[string " local header = self:GetParent()..."]:1>
[string "=[C]"]: ?
[string "@FrameXML\RestrictedExecution.lua"]:484: in function <FrameXML\RestrictedExecution.lua:447>
[string "@FrameXML\SecureGroupHeaders.lua"]:116: in function <FrameXML\SecureGroupHeaders.lua:110>
[string "@FrameXML\SecureGroupHeaders.lua"]:173: in function <FrameXML\SecureGroupHeaders.lua:130>
[string "@FrameXML\SecureGroupHeaders.lua"]:406: in function <FrameXML\SecureGroupHeaders.lua:394>
[string "=[C]"]: in function `Show'
[string "@FrameXML\SecureStateDriver.lua"]: 100 : in function <FrameXML\SecureStateDriver.lua:95>
[string "@FrameXML\SecureStateDriver.lua"]:127: in function <FrameXML\SecureStateDriver.lua:119>
EDIT: spaced the semicolons around the 100 on second to last line to prevent an emoji (:100:), because that's a Thing for some reason.