Okay upon everyone's suggestion im attempting to shorten code.
best way i can see especially when needing to do something for 4 sets of frames all the time, is to use local function blahblah(i) where i = the partyframe number. The problem or question i have is how to tag certain lines when trying to use ..i.. like the following...
lua Code:
local function Party1Style1NameTextEvents()
local Party1Exists = UnitExists("Party1")
if Party1Exists == 1 then
local Party1Name = UnitName("Party1")
local Party1NameStr = ("%s"):format(Party1Name)
Party1NameText:SetText(Party1NameStr)
end
GrimUI.Party1NameColoring()
end
GrimUI.Party1Style1NameTextEvents = Party1Style1NameTextEvents
ultimately i need everywhere it says Party1 to read Party..i..
ive been successful in breaking down somethings but the tag is different for certain things... like the following
lua Code:
CreateFrame('Frame', "Party"..i.."PedestalFrame", _G["GUI_Party"..i.."Frame"])
the one version is a already made frame... the other is the new frame. one needs _G and [] the other does not. there is a handful of other things not frame name or current frame id like to change 1 to a variable to shorten the 4x repeated party frame creation...