Thread Tools Display Modes
10-18-14, 03:18 AM   #1
Lazare
An Aku'mai Servant
 
Lazare's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 36
staring me in the face...

I took over the QuestGuru addon as it was "dying" and wanted to save it, but now need saving myself. Not sure how well I will come thru with this since being up for 30 hours is wacking me out a bit. The errors that I am getting are:
Code:
1x QuestGuru\QuestGuru-2.3.00-60000.lua:66: attempt to index local 'QuestLogFrame' (a nil value)
QuestGuru\QuestGuru-2.3.00-60000.lua:66: in main chunk

Locals:

and 

3x QuestGuru\QuestGuru-2.3.00-60000.lua:52: attempt to call global 'QuestGuru_OnEvent' (a nil value)
QuestGuru\QuestGuru-2.3.00-60000.lua:52: in function <QuestGuru\QuestGuru.lua:51>

Locals:
and my code in this area is ( the code from the top to error area is here):
Lua Code:
  1. QUESTGURU_VERSION = GetAddOnMetadata("QuestGuru", "Version");
  2.  
  3.  
  4. local QG = QuestGuru
  5.  
  6.  
  7. QuestGuru_Settings = {};
  8. QuestGuru_Items = {};
  9.  
  10.  
  11. QGC_Cache = {};
  12. QGC_Active = {};
  13.  
  14.  
  15. BINDING_HEADER_QUESTGURU = "QuestGuru"
  16. BINDING_NAME_QUESTGURU_TOGGLE = "Show/Hide QuestGuru"
  17.  
  18.  
  19. local QuestGuru, QuestLogFrame, QuestGuru_RealmName, QuestGuru_PlayerFaction;
  20.  
  21.  
  22. --local function QG:OnShow()
  23. --    if WorldMapFrame:IsVisible() then
  24. --        ToggleWorldMap() -- can't have world map up at same time due to potential details frame being up
  25. --    end
  26. --    if QuestLogPopupDetailFrame:IsVisible() then
  27. --        HideUIPanel(QuestLogPopupDetailFrame)
  28. --    end
  29. --    local selected = GetQuestLogSelection()
  30. --    if not selected or selected==0 then
  31. --        QG:SelectFirstQuest()
  32. --    else
  33. --        QG:SelectQuestIndex(selected)
  34. --    end
  35. --    QG:RegisterEvent("QUEST_DETAIL")
  36. --    QG:RegisterEvent("QUEST_LOG_UPDATE")
  37. --    QG:RegisterEvent("QUEST_WATCH_LIST_CHANGED")
  38. --    QG:RegisterEvent("SUPER_TRACKED_QUEST_CHANGED")
  39. --    QG:RegisterEvent("GROUP_ROSTER_UPDATE")
  40. --    QG:RegisterEvent("PARTY_MEMBER_ENABLE")
  41. --    QG:RegisterEvent("PARTY_MEMBER_DISABLE")
  42. --    QG:RegisterEvent("QUEST_POI_UPDATE")
  43. --    QG:RegisterEvent("QUEST_WATCH_UPDATE")
  44. --    QG:RegisterEvent("QUEST_ACCEPTED")
  45. --    QG:RegisterEvent("UNIT_QUEST_LOG_CHANGED")
  46. --    if not tContains(UISpecialFrames,"QuestGuru") then
  47. --        tinsert(UISpecialFrames,"QuestGuru")
  48. --    end
  49. --    QG.detail:ClearAllPoints()
  50. --    QG.detail:SetPoint("TOPRIGHT",-32,-63)
  51. --end
  52.  
  53.  
  54.  
  55.  
  56. do
  57.     local QuestGuru_Frame = CreateFrame("Frame", "QuestGuru_Frame", UIParent);
  58.     QuestGuru_Frame:SetScript("OnEvent",
  59.         function (self, event, arg1, arg2)
  60.             QuestGuru_OnEvent(self, event, arg1, arg2);
  61.         end);
  62.  
  63.  
  64.     QuestGuru_Frame:RegisterEvent("QUEST_COMPLETE");
  65.     QuestGuru_Frame:RegisterEvent("QUEST_LOG_UPDATE");
  66.     QuestGuru_Frame:RegisterEvent("QUEST_PROGRESS");
  67.     QuestGuru_Frame:RegisterEvent("UI_INFO_MESSAGE");
  68.     QuestGuru_Frame:RegisterEvent("VARIABLES_LOADED");
  69.     QuestGuru_Frame:RegisterEvent("GOSSIP_SHOW");
  70.     QuestGuru_Frame:RegisterEvent("QUEST_DETAIL");
  71.     QuestGuru_Frame:RegisterEvent("QUEST_GREETING");
  72.     QuestGuru_Frame:RegisterEvent("QUEST_PROGRESS");
  73.  
  74.  
  75.     tinsert(UISpecialFrames, "QuestLogFrame");
  76.     QuestLogFrame:SetMovable(true)
  77.     QuestLogFrame:EnableMouse(true)
  78.     QuestLogFrame:RegisterForDrag("LeftButton")
  79.     QuestLogFrame:SetScript("OnDragStart", QuestLogFrame.StartMoving)
  80.     QuestLogFrame:SetScript("OnDragStop", QuestLogFrame.StopMovingOrSizing)
  81. end

Thanks in advance for the help , now to try to sleep without too much LUA in my dreams and hope tomorrow's dialysis goes ok. Cheers
__________________
"There's no such thing as too many addons."
Lothaer

My Authored Addons
HOME OF THE FREE, BECAUSE OF THE BRAVE
  Reply With Quote
10-18-14, 03:36 AM   #2
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
Error 1: You're creating a local variable QuestLogFrame on line 19 of your code snippet, but you're not assigning it any value. This means that it's nil when you try to call :SetMovable on it on line 76, which throws the "attempt to index local 'QuestLogFrame' (a nil value)" error.

It looks like you expect the variable to point to a frame, but are you meant to be referencing an existing frame or creating your own?

Error 2: You're trying to call the QuestGuru_OnEvent function in the OnEvent script of QuestGuru_Frame, but you never assign a function to QuestGuru_OnEvent, so it's nil.

You need to actually define the QuestGuru_OnEvent function somewhere (preferably as a local function unless you require it to be global).
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » staring me in the face...

Thread Tools
Display Modes

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