View Single Post
11/09/14, 05:30 PM   #4
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by justinbarrett View Post
ty for your response.
using this..
Code:
local screensizex = GuiRoot:GetWidth()
UI_BackgroundWindowBackdrop:SetValue(screensizeX)
I get this error
"attempt to index a nil value stack traceback"(then pointing to the function)
GetWidth() is expecting a value maybe dimension.x or something?
or is there a better place to ask such beginner questions?
Lua is case sensative
Lua Code:
  1. --Lua is case senstaive on the first line you have screensizex
  2. local screensizex = GuiRoot:GetWidth()
  3. --but on the second you use screensizeX
  4. UI_BackgroundWindowBackdrop:SetValue(screensizeX)
  5.  
  6. -- That wont work make them match somehow, for example change the first line to:
  7. local screensizeX = GuiRoot:GetWidth()

I don't know what: UI_BackgroundWindowBackdrop is, I'm assuming a backdrop control, so I'm guessing your trying to resize that control to be the width of the screen?
So your probably wanting to do:
Lua Code:
  1. -- This:
  2. UI_BackgroundWindowBackdrop:SetWidth(screensizeX)
  3. -- Instead of this:
  4. UI_BackgroundWindowBackdrop:SetValue(screensizeX)


The General Authoring Discussion forum: General Authoring Discussion
Or Lua/XML Help forum: Lua/XML Help

Last edited by circonian : 11/09/14 at 05:34 PM.
  Reply With Quote