Quantcast
Carbonite Unexpectedly Returns Nil - WoWInterface
 
 
Thread Tools Display Modes
07-08-14, 01:40 PM   #1
tahutto
A Murloc Raider
Join Date: May 2009
Posts: 8
Exclamation Carbonite Unexpectedly Returns Nil

First, let me give you a BIG KUDO for giving us Carbonite. I like your quest helper but Dugi's guides have a broader reach so...

Here is the reply I got from Dugi:
This is an error with carbonite, as it plugs into our addon.
Carbonite.Quests returns nil when there should be a value, meaning that carbonite did not populate that table.

In Leyman's terms, what is supposed to be in the carbonite addon, simply is not there.
Please contact Carbonite's author.

I am using Addon Control Panel,
Dugi's Guides 1.2.1 ,and Carbonite
## Interface: 50400
## Title: Carbonite 5.4.2 alpha 5

"Conflict Between Carbonite and Dugi's Guides Viewer" by tahutto (Edit)
Message: Interface\AddOns\Carbonite.Quests\NxQuest.lua:4391: bad argument #1 to 'ipairs' (table expected, got nil)
Time: 06/30/14 18:38:30
Count: 1
Stack: [C]: in function `ipairs'
Interface\AddOns\Carbonite.Quests\NxQuest.lua:4391: in function `FindCur'
Interface\AddOns\Carbonite.Quests\NxQuest.lua:8286: in function `RemoveWatch'
Interface\AddOns\DugisGuideViewerZ\Guides.lua:1417: in function `WatchQuest'
...erface\AddOns\DugisGuideViewerZ\DugisGuideViewer.lua:2084: in function `SettingFrameChkOnClick'
...erface\AddOns\DugisGuideViewerZ\DugisGuideViewer.lua:671: in function `OnLoad'
...erface\AddOns\DugisGuideViewerZ\DugisGuideViewer.lua:2496: in function `?'
...erface\AddOns\DugisGuideViewerZ\DugisGuideViewer.lua:100: in function <...erface\AddOns\DugisGuideViewerZ\DugisGuideViewer.lua:89>
[C]: ?

Locals: (*temporary) = nil
(*temporary) = "table expected, got nil"
= <function> defined =[C]:-1
1 Weeks Ago Thumbs Up Thumbs DownCalliann -- Jul 1 2014, 12:32 AM
Hi tahutto,

This is an error with carbonite, as it plugs into our addon.
Carbonite.Quests returns nil when there should be a value, meaning that carbonite did not populate that table.

In Leyman's terms, what is supposed to be in the carbonite addon, simply is not there.
Please contact Carbonite's author.

-Calliann
__________________
Maggii 85 Frost Mage on Scarlet Crusade

Last edited by tahutto : 07-08-14 at 02:03 PM.
 
07-08-14, 02:20 PM   #2
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
They tried to add compatability with Carbonite, and it's not working... now they are trying to pass it off as a problem in Carbonite.

Nx.Quest.Watch:RemoveWatch(qid, logindex) is the line they are trying to call incorrectly, and since I don't use Dugi's I can't debug their addon to try and suggest how they fix it.

My first guess would be they are populating the logindex table before Carbonite is even fully loaded, since Carbonite puts itself at the very bottom of addon loading routines to avoid conflicts if you login during combat.
 
07-18-14, 05:21 PM   #3
DugiGuides
A Murloc Raider
 
DugiGuides's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2010
Posts: 8
It is a problem when two completely different version of Carbonite exists with the exact same addon name.

It is working with Carbonite Release and not Beta, obviously because of the changes you made to the original functions.

If I changed it to work with Carbonite Beta then it won't work with Carbonite Release, do you see the dilemma?

There are people using Carbonite Release and there are people using Carbonite Beta and I can't make them both happy until you make up your mind and finaly set Carbonite Beta as Release.

BTW Rythal since you are alive and well.

I hate to say this here but you left me no choice since you don't reply to my emails or messages. It's not professional how you accepted my Job offer, then you dissapeared from the face of the earth and you don't even have the courtesy to tell me or reply any of my messages.
 
08-11-14, 01:34 AM   #4
DeaTHCorEKiD
A Deviate Faerie Dragon
Join Date: Apr 2010
Posts: 14
hello...

first: sorry for my english, i'm come from german and english is not my best language

i use carbonite beta 5.4.2 Alpha 5 with DugiGuidesPack v6.873 (the actual version) and i have modifyd the addons, so thats work. it's a desaster, that i read here, rythal don't replay any email from dugi, so i must change the dugi addon by all new version from hand

here the changes from me (i have all changes marked with "-- DeaTHCorE..." and the mark ends with "-- ** --") :

in file NxQuest.lua i have changed the follow function:

function Nx.Quest:FindCur (qId, qIndex)

if type (qId) == "string" then -- Quest title?

for n, v in ipairs (self.CurQ) do
if v.Title == qId then
return n, v, qId
end
end

return
end

if qIndex and qId == 0 then
local i, cur = self:FindCurByIndex (qIndex)
return i, cur, cur.Title -- Also return string type id
end

assert (qId > 0)

-- DeaTHCorE - added for compatibility with Carbonite beta...
if not self.CurQ then
return
end
-- ** --

for n, v in ipairs (self.CurQ) do
if v.QId == qId then
return n, v, qId
end
end
end


into the file DugisGuideViwer.lua i have changed the follow function:

function DugisGuideViewer:GetCarboniteQuestLogIndexByQID(qid)
local i
for i=1,40 do
-- DeaTHCorE - added for carbonite beta
if not (Nx.Quest.CurQ) then
return
end
-- ** --
if Nx.Quest.CurQ[i] then
local curq = Nx.Quest.CurQ[i];
local qid2 = curq.QId;
if qid2 == qid then return i end
end
end
end


into the file Guides.lua i have changed the follow functions

function DGV:WatchQuest()
local logindex
DGU.removedQuests = {}
if self:UserSetting(DGV_ENABLEQW) and DGV:isValidGuide(CurrentTitle) == true then
for logindex = 1, GetNumQuestLogEntries() do
local qid = DGV:GetQIDByLogIndex(logindex)
if not DGU.watchedQuests[qid] then
if DGV.carboniteloaded and qid ~= 0 then
Nx.Quest.Watch:RemoveWatch(qid, logindex)
else
RemoveQuestWatch(logindex)
end
end
if DGU.watchedQuests[qid] ~= nil and not IsQuestWatched(logindex) then --clean up watchedQuest
DGU.watchedQuests[qid] = nil
end
end
end

if (self:UserSetting(DGV_ENABLEQW) or self:UserSetting(DGV_OBJECTIVECOUNTER)) and DGV:isValidGuide(CurrentTitle) == true then
local i = DGU.CurrentQuestIndex
if strmatch(self.actions[DGU.CurrentQuestIndex], "[R]") then
logindex = self:GetQuestLogIndexByQID(self.qid[i])
i = i + 1
end
local skiplogindex = nil
local onceonly = false
while i <= #visualRows and strmatch(self.actions[i], "[CTNK]") do
if self:GetQuestState(i) ~= "X" then
if DGV.carboniteloaded then
logindex = self:GetCarboniteQuestLogIndexByQID(self.qid[i])
else
logindex = self:GetQuestLogIndexByQID(self.qid[i])
end

if logindex and DGV.carboniteloaded then
Nx.Quest.Watch:Add(logindex)
elseif logindex then
if self:UserSetting(DGV_OBJECTIVECOUNTER) and self:UserSetting(DGV_MULTISTEPMODE) then
RemoveQuestWatch(logindex)
DGU.removedQuests[self.qid[i]] = true
elseif self:UserSetting(DGV_OBJECTIVECOUNTER) and not self:UserSetting(DGV_MULTISTEPMODE) and (skiplogindex ~= logindex) and not onceonly and not strmatch(self.actions[DGU.CurrentQuestIndex], "[R]") then
RemoveQuestWatch(logindex)
skiplogindex = logindex
onceonly = true
DGU.removedQuests[self.qid[i]] = true
elseif skiplogindex ~= logindex or strmatch(self.actions[DGU.CurrentQuestIndex], "[R]") then
AddQuestWatch(logindex)
end
end
end
i = i + 1
end
end

if self:UserSetting(DGV_ENABLEQW) and DGV:isValidGuide(CurrentTitle) == true then
if DGV.carboniteloaded and strmatch(self.actions[DGU.CurrentQuestIndex], "[CTNK]") and DGV.qid[DGU.CurrentQuestIndex] then
-- DeaTHCorE - added for carbonite beta...
if (Nx.Quest.Tracking) then
-- ** --
local cqid = DGV.qid[DGU.CurrentQuestIndex]
cqid = tonumber(cqid)
local cqidpart = DGV:ReturnTag("QIDP", DGU.CurrentQuestIndex)
cqidpart = tonumber(cqidpart)
if cqid and strmatch(self.actions[DGU.CurrentQuestIndex], "[T]") then
Nx.Quest.Tracking[cqid] = 1
Nx.Quest:TrackOnMap(cqid, 0, true, true, true)
elseif cqid and cqidpart == 1 then
Nx.Quest.Tracking[cqid] = 2
Nx.Quest:TrackOnMap(cqid, 1, true, true, true)
elseif cqid and cqidpart == 2 then
Nx.Quest.Tracking[cqid] = 4
Nx.Quest:TrackOnMap(cqid, 2, true, true, true)
elseif cqid and cqidpart == 3 then
Nx.Quest.Tracking[cqid] = 8
Nx.Quest:TrackOnMap(cqid, 3, true, true, true)
elseif cqid and cqidpart == 4 then
Nx.Quest.Tracking[cqid] = 16
Nx.Quest:TrackOnMap(cqid, 4, true, true, true)
elseif cqid then
Nx.Quest.Tracking[cqid] = 2
Nx.Quest:TrackOnMap(cqid, 1, true, true, true)
end
-- DeaTHCorE - added for carbonite beta...
end
-- ** --
end
end

if (self:UserSetting(DGV_ENABLEQW) or self:UserSetting(DGV_OBJECTIVECOUNTER)) and DGV:isValidGuide(CurrentTitle) == true then
WatchFrame_Update()
end
end


function DGV:Tooltip_OnEnter(self, event, ...)

local name = self:GetName()
local title = _G[self:GetName().."Name"]:GetText()
local text = _G[self:GetName().."Desc"]:GetText()

CreateFrame( "GameTooltip", "LargeFrameTooltip", nil, "GameTooltipTemplate" );
LargeFrameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
LargeFrameTooltip:SetParent(UIParent)
LargeFrameTooltipTextLeft1:SetFont("Fonts\\FRIZQT__.TTF", 12)

--LargeFrameTooltip:SetPadding(5)
-- DeaTHCorE - eliminate a nil title...
--LargeFrameTooltip:AddLine("|cfff0c502"..title.."|r", 1, 1, 1, true)
LargeFrameTooltip:AddLine("|cfff0c502"..(title or "No Titel...").."|r", 1, 1, 1, true)
-- ** --
LargeFrameTooltip:AddLine(" ", 1, 1, 1, true)
LargeFrameTooltip:AddLine(text, 1, 1, 1, true)
LargeFrameTooltip:Show()
--[[
local ttwidth, ttheight, fwidth, fheight, pad = DGV:GetToolTipSize(LargeFrameTooltip)

--DebugPrint("fwidth:"..fwidth.." fheight:"..fheight.." ttwidth"..ttwidth.." ttheight"..ttheight.." pad"..pad)

local scaleFactor = fwidth / ttwidth
local maxScale = 1.3
if (scaleFactor > 1) then
local newwidth
if scaleFactor > maxScale then
scaleFactor = maxScale

end

if(scaleFactor < 1.10) then
newwidth = fwidth * 1.10
else
newwidth = ttwidth * scaleFactor
end
LargeFrameTooltip:SetWidth(newwidth)
LargeFrameTooltipTextLeft1:SetWidth(newwidth - 15)
LargeFrameTooltip:SetHeight(LargeFrameTooltipTextLeft1:GetHeight() + 20)

ttwidth, ttheight, fwidth, fheight, pad = DGV:GetToolTipSize()
--DebugPrint("2fwidth:"..fwidth.." fheight:"..fheight.." ttwidth"..ttwidth.." ttheight"..ttheight.." pad"..pad)
end
--]]
LargeFrameTooltip:SetFrameStrata("TOOLTIP")
end


and last into the file StickyFrame.lua the follow function:

local function OnEnter(button, event)
if not SF.Tooltip then
SF.Tooltip = CreateFrame( "GameTooltip", "StickyFrameTooltip", nil, "GameTooltipTemplate" )
end
local stickyIndex = tonumber(button:GetName():match("DGV_SFRow(%d*)"))
local guideIndex = SF.StickyQuests[stickyIndex]
--if guideIndex then DebugPrint("guideIndex="..guideIndex) end
--if stickyIndex then DebugPrint("stickyIndex="..stickyIndex) end

if guideIndex then
local mainFrameRow = _G["DGVRow"..guideIndex]

SF.Tooltip:SetFrameStrata("TOOLTIP")
SF.Tooltip:SetOwner(SF.Frame, "ANCHOR_TOPLEFT")
SF.Tooltip:SetParent(SF.Frame)
StickyFrameTooltipTextLeft1:SetFont("Fonts\\FRIZQT__.TTF", 12)
StickyFrameTooltipTextLeft2:SetFont("Fonts\\FRIZQT__.TTF", 12)
-- DeaTHCorE - changed for a nil result in mainFrameRow.Name:GetText()...
--SF.Tooltip:AddLine("|cfff0c502"..mainFrameRow.Name:GetText().."|r", 1, 1, 1, true)
SF.Tooltip:AddLine("|cfff0c502"..(mainFrameRow.Name:GetText() or "Name not found").."|r", 1, 1, 1, true)
-- ** --
SF.Tooltip:AddLine(" ", 1, 1, 1, true)
SF.Tooltip:AddLine(mainFrameRow.Desc:GetText(), 1, 1, 1, true)
SF.Tooltip:Show()
end
end


that'a all. i think, the changes in the file StickyFrame.lua are not needed, this eliminates a other bug and the changes in the file Guides.lua, in the function DGV:Tooltip_OnEnter(self, event, ...) are not needed, this eliminates a other bug .

i hope, it's help many users and rythal and dugi can make a compatible version for us. i think, all changes are not completly right a i can say, it's work and i can use carbonite beta and dugi.

cu DeaTHCorE
 
08-11-14, 12:19 PM   #5
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
Originally Posted by DugiGuides View Post
BTW Rythal since you are alive and well.

I hate to say this here but you left me no choice since you don't reply to my emails or messages. It's not professional how you accepted my Job offer, then you dissapeared from the face of the earth and you don't even have the courtesy to tell me or reply any of my messages.
If you wish to air laundry, at the time I wasn't on anything.. I do agree it wasn't overly professional and I apologize for that, lack of any internet access for 2 weeks made it relatively difficult to convey anything, and by the time I did get back, and dealt with my employer about things.. it was already to late and I wasn't going to try making excuses. It was better to just leave well off alone.

While I really do appreciate the job offer when I was in need, and I'm sorry things turned out as they did.

As for two different versions, there is only 1 that should be supported by anything.. the alpha is the only release and will be released as the full version next release.
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » Carbonite Unexpectedly Returns Nil

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