Here is the current chat code it still does not work. Also it would appear that it really does save to the server. However it will only load off the server if A: it can not find a valid chat-cache.txt file and B: their is no other chat setup code used, or if your chat code has errors.
Code:
local dummy = function() end
-----------------------------------
-- Start Setup Variable CHeck --
-----------------------------------
local GrimUIFirstLoad = CreateFrame("Frame");
GrimUIFirstLoad:RegisterEvent("ADDON_LOADED");
GrimUIFirstLoad:RegisterEvent("PLAYER_LOGOUT");
function GrimUIFirstLoad:OnEvent(event, arg1)
if event == "ADDON_LOADED" and arg1 == "FirstLoad" then
if FirstLoad == nil then
FirstLoad = False;
end
if FirstLoadTrue then
ChatFrame1:ClearAllPoints()
ChatFrame1:SetPoint("BOTTOMLEFT", GrimUIcoreArtB1, "BOTTOMLEFT", 14, 25)
ChatFrame1:SetWidth(350)
ChatFrame1:SetHeight(190)
ChatFrame1:SetFrameLevel(8)
ChatFrame1UpButton:Hide()
ChatFrame1DownButton:Hide()
DEFAULT_CHAT_FRAME.ClearAllPoints = dummy
DEFAULT_CHAT_FRAME.SetPoint = dummy
ChatFrame1UpButton.Show = dummy
ChatFrame1DownButton.Show = dummy
ChatFrame1.ClearAllPoints = dummy
ChatFrame1.SetPoint = dummy
ChatFrame1UpButton.Show = dummy
ChatFrame1DownButton.Show = dummy
-- ChatFrame2 Combat Log
ChatFrame2:ClearAllPoints()
SetChatWindowShown(2, 1)
ChatFrame2:SetPoint("BOTTOMRIGHT", GrimUIcoreArtB4, "BOTTOMRIGHT", -13, 17)
SetChatWindowAlpha(2, 1)
ChatFrame2UpButton:Hide()
ChatFrame2DownButton:Hide()
ChatFrame2:SetWidth(143)
ChatFrame2:SetHeight(126)
ChatFrame2:SetFrameLevel(8)
ChatFrame2.ClearAllPoints = dummy
ChatFrame2.SetPoint = dummy
ChatFrame2.SetFrameLevel = dummy
ChatFrame2UpButton.Show = dummy
ChatFrame2DownButton.Show = dummy
--ChatFrame3 Trade
SetChatWindowDocked(3, 1)
SetChatWindowName(3, "Trade")
ChatFrame3UpButton:Hide()
ChatFrame3DownButton:Hide()
ChatFrame3.ClearAllPoints = dummy
ChatFrame3UpButton.Show = dummy
ChatFrame3DownButton.Show = dummy
-- ChatFrame4 Whisper
SetChatWindowDocked(4, 1)
SetChatWindowName(4, "Whisper")
AddChatWindowMessages(4, "WHISPER")
ChatFrame4UpButton:Hide()
ChatFrame4DownButton:Hide()
ChatFrame4.ClearAllPoints = dummy
ChatFrame4UpButton.Show = dummy
ChatFrame4DownButton.Show = dummy
--ChatFrame5 Guild
SetChatWindowDocked(5, 1)
SetChatWindowName(5, "Guild")
AddChatWindowMessages(5, "GUILD")
AddChatWindowMessages(5, "GUILD_OFFICER")
AddChatWindowMessages(5, "GUILD_ACHIEVEMENT")
ChatFrame5UpButton:Hide()
ChatFrame5DownButton:Hide()
ChatFrame5.ClearAllPoints = dummy
ChatFrame5UpButton.Show = dummy
ChatFrame5DownButton.Show = dummy
--ChatFrame6 Info Log
ChatFrame6:ClearAllPoints()
ChatFrame6:SetPoint("BOTTOMRIGHT", ChatFrame2, "BOTTOMLEFT", -7, 0)
SetChatWindowDocked(6, 0)
SetChatWindowShown(6, 1)
SetChatWindowName(6, "Info Log")
SetChatWindowAlpha(6, 1)
ChatFrame6:SetWidth(212)
ChatFrame6:SetHeight(130)
ChatFrame6UpButton:Hide()
ChatFrame6DownButton:Hide()
ChatFrame6:SetFrameLevel(10)
ChatFrame6.ClearAllPoints = dummy
ChatFrame6.SetPoint = dummy
ChatFrame6UpButton.Show = dummy
ChatFrame6DownButton.Show = dummy
RemoveChatWindowChannel(1, "Trade")
RemoveChatWindowMessages(1, "SKILL")
RemoveChatWindowMessages(1, "LOOT")
RemoveChatWindowMessages(1, "MONEY")
RemoveChatWindowMessages(1, "COMBAT_FACTION_CHANGE")
AddChatWindowMessages(6, "SKILL")
AddChatWindowMessages(6, "LOOT")
AddChatWindowMessages(6, "MONEY")
AddChatWindowMessages(6, "TRADESKILLS")
AddChatWindowMessages(6, "PET_INFO")
AddChatWindowMessages(6, "COMBAT_XP_GAIN")
AddChatWindowMessages(6, "OPENING")
AddChatWindowMessages(6, "COMBAT_MISC_INFO")
AddChatWindowMessages(6, "COMBAT_FACTION_CHANGE")
AddChatWindowMessages(6, "COMBAT_HONOR_GAIN")
ChatFrame_AddChannel(ChatFrame3,"Trade");
print("GrimUI first time use. Please Log out and/or /reload to save and finish settings.");
elseif
FirstLoadFalse then
print("GrimUI Loaded");
end
elseif event == "PLAYER_LOGOUT" then
FirstLoad = false;
end
end
GrimUIFirstLoad:SetScript("OnEvent", GrimUIFirstLoad.OnEvent);