Originally Posted by justinbarrett
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:
--Lua is case senstaive on the first line you have screensizex
local screensizex = GuiRoot:GetWidth()
--but on the second you use screensizeX
UI_BackgroundWindowBackdrop:SetValue(screensizeX)
-- That wont work make them match somehow, for example change the first line to:
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:
-- This:
UI_BackgroundWindowBackdrop:SetWidth(screensizeX)
-- Instead of this:
UI_BackgroundWindowBackdrop:SetValue(screensizeX)
The General Authoring Discussion forum:
General Authoring Discussion
Or Lua/XML Help forum:
Lua/XML Help