Thread: Bag Lua Problem
View Single Post
07-04-10, 04:42 PM   #7
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Change this:

Code:
-- Change this
local bagbg = CreateFrame("Frame", bagbg, contname)

-- ...to this.
local bagbg = CreateFrame("Frame", nil, _G[contname])
In your current code, you're setting the global name of bagbg to something undefined. I set it to nil, because you'll probably not be accessing it globally. You're also attempting to parent it to a name (string), which isn't possible - I've changed it to actually parent to the globally-accessible frame of that name.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote