Thread Tools Display Modes
02-10-17, 05:11 AM   #1
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Question Issues with UIConfig

Hello friends, so sorry to bother you all again.

Today I am running into this problem while trying to make a menu with buttons.

Here is the code:
Code:
local UIConfig = CreateFrame("Frame", "Paws_BuffFrame", UIParent, "BasicFrameTemplateWithInset");

UIConfig:SetSize(300, 360);
UIConfig:SetPoint("CENTER", UIParent, "CENTER");

UIConfig.title = UIConfig:CreateFontString(nil, "OVERLAY");
local successful = UIConfig.title:SetFont("Fonts\\FRIZQT__.ttf", 16, "THICKOUTLINE"); -- tells if the fonts were loaded right or not
if (not successful) then print("Font Load Failed!")
  end
--UIConfig.title:SetFontObject("GameFontHighlight");
UIConfig.title:SetPoint("CENTER", UIConfig.TitleBg, "CENTER", 5, 1);
UIConfig.title:SetText("|cffFF9900Paws|rUI Buff Options");

-- Save Button

UIConfig.saveButton = CreateFrame("Button", nil UIConfig, "GameMenuButtonTemplate");
UIConfig.saveButton:SetPoint("CENTER", UIConfig, "TOP", 0, -70);
UIConfig.saveButton:SetSize(140, 40);
UIConfig.saveButton:SetText("Save");
UIConfig.saveButton:SetNormalFontObject("GameFontNormalLarge");
UIConfig.saveButton:SetHightlightFontObject("GameFontHighlightLarge");

-- Reset Button

UIConfig.resetBtn = CreateFrame("Button", nil UIConfig, "GameMenuButtonTemplate");
UIConfig.resetBtn:SetPoint("TOP", UIConfig.saveButton, "BOTTOM", 0, -10);
UIConfig.resetBtn:SetSize(140, 40);
UIConfig.resetBtn:SetText("Reset");
UIConfig.resetBtn:SetNormalFontObject("GameFontNormalLarge");
UIConfig.resetBtn:SetHightlightFontObject("GameFontHighlightLarge");

-- Load Button

UIConfig.loadBtn = CreateFrame("BUTTON", nil UIConfig, "GameMenuButtonTemplate");
UIConfig.loadBtn:SetPoint("TOP", UIConfig.resetBtn, "BOTTOM", 0, -10)
UIConfig.loadBtn:SetSize(140, 40);
UIConfig.loadBtn:SetText("Load");
UIConfig.loadBtn:SetNormalFontObject("GameFontNormalLarge");
UIConfig.loadBtn:SetHightlightFontObject("GameFontHighlightLarge");
Here is the error thrown:
Code:
Message: Interface\AddOns\PawsUI\BuffFrame/buffframe.lua:16: ')' expected near 'UIConfig'
Time: 02/10/17 06:09:24
Count: 1
Stack: 
Locals:
I am at a loss, I have tried all kinds of combinations, I must have missed something somewhere. Is any help available?

File is attached.

Respectfully,

- C
Attached Files
File Type: lua buffframe.lua (1.7 KB, 98 views)
  Reply With Quote
02-10-17, 05:56 AM   #2
Tosaido
A Fallenroot Satyr
 
Tosaido's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2015
Posts: 23
At line 16 you are missing a , in between nil and UIConfig

Edit: It appears that issues occurs at every line you are creating an element. so line 16, 25 and 34
and at line 34 change "BUTTON" to "Button"

Last edited by Tosaido : 02-10-17 at 06:06 AM.
  Reply With Quote
02-10-17, 07:45 AM   #3
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Awesome, wow, can't believe I missed that. That did the trick. Thank you so much.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Issues with UIConfig


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off