Thread Tools Display Modes
05-17-11, 12:54 PM   #1
Goldpaw
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 56
[Bug] oUF_MovableFrames\movable.lua:353: bad argument #1 to '(for generator)'

I'm getting the following error (copied from BugSack) when upgrading from oUF_MovableFrames 1.11 to 1.14;

1x ...les\unitframes\plugins\oUF_MovableFrames\movable.lua:353: bad argument #1 to '(for generator)' (table expected, got nil):
...les\unitframes\plugins\oUF_MovableFrames\movable.lua:353: in function <...les\unitframes\plugins\oUF_MovableFrames\movable.lua:343>:
(tail call): ?:
Problem seems to be that the _DB.__INITIAL table doesn't exist (for people who just upgraded from 1.11) when the VARIABLES_LOADED event occur, yet the addon assumes it does. It was solved for me by simply adding a check for it:

lua Code:
  1. -- Clean up the defaults DB:
  2. if _DB.__INITIAL then
  3.     for layout, frames in next, _DB.__INITIAL do
  4.         if(not _DB[layout])  then
  5.             _DB.__INITIAL[layout] = nil
  6.         else
  7.             for frame in next, frames do
  8.                 if(not _DB[layout][frame]) then
  9.                     _DB.__INITIAL[layout][frame] = nil
  10.                 end
  11.             end
  12.         end
  13.     end
  14. end

If this issue already has been reported somewhere, I apologize. I couldn't find anything!
  Reply With Quote
05-17-11, 02:06 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Zork reported it earlier today. I didn't have time to push a fix then however. I pushed 1.15 now, which solves the issue.
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » [Bug] oUF_MovableFrames\movable.lua:353: bad argument #1 to '(for generator)'


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