This is line 123; the error is saying that _G["CompactRaidFrame" .. i] doesn't exist, so it's the same as calling nil:CreateBeautyBorder(12).
Lua Code:
for i = 1, 80 do -- Raid Frames, do we really have 80 of them? Don't remember
_G["CompactRaidFrame" .. i]:CreateBeautyBorder(12)
end
You need to add a check that the frame you're trying to access has been created, and you may as well make a function for it since you call it so many times.
Something like this..
Lua Code:
local function Borderize(frame) -- style our frame
if frame then
frame:CreateBeautyBorder(12)
end
end
-- ...
for i = 1, 5 do -- Party Frames
Borderize(_G["CompactPartyFrameMember" .. i])
end
for i = 1, 80 do -- Raid Frames
Borderize(_G["CompactRaidFrame" .. i])
end
-- etc.
You should probably also have checks preventing you from styling the same frame more than once (I have no idea what CreateBeautyBorder does), and you have globals like "b" and "f", but that should at least fix your error.