Thread Tools Display Modes
10/29/14, 03:19 PM   #1
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Probably a very Simple XML question but need some help here

This is just a part of what I'm working on. It's pretty simple. I'm just trying to get this to look like a window with some information in it covering QuestLurker. So people can look at each zone I have in there and just be able to plan ahead if they want. Here is my xml so far and if you'll scroll down passed it you'll see how I want it to appear on the window.

xml
Lua Code:
  1. <GuiXml>
  2.     <Controls>
  3.             <TopLevelControl name="QuestLurkerBook" clampedToScreen="true" mouseEnabled="true" movable="false" setHidden="true">
  4.                 <Dimensions x="800" y="800" />         
  5.                 <Anchor point="CENTER" />
  6.                 <Controls>
  7.                     <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" alpha="0.8" />
  8.                     <Label name="$(parent)Roll" font="ZoFontWindowTitle" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="CENTER" horizontalAlignment="CENTER" text="QuestLurkerBook" >
  9.            
  10.                         <AnchorFill />
  11.                
  12.                     </Label>
  13.                 </Controls>
  14.             </TopLevelControl>
  15.     </Controls>
  16. </GuiXml>

How I would like it to look. However I may have to make it where you can scroll down the window. I don't really know the tags to scroll and to set this to look nice and neat. It would help to have a sample of the code with just the Aldmeri Dominion zone and Daggerfall Covenant. This should give me enough understanding on how to put this much text on a window in the game. If you know how to make the window scroll it would help a lot as well. This is the first part I plan on hiding this when someone starts there game and they can just type a simple slash command to pull it up and down anytime they want to look at it.

QuestLurkerBook
Aldmeri Dominion
*Khenarthis Roost: 11
*Auridon: 51
*Grahtwood: 44
*Greenshade: 50
*Malabal Tor: 45
*Reaper's March: 60

Daggerfall Covenant
*Stros M'Kai: 15
*Betnikh: 9
*Glenumbra: 67
*Stormhaven: 70
*Rivenspir: 48
*Alik'r Desert: 53
*Bangkorai: 47

Ebonheart Pact
*Bleakrock Isle: 12
*Bal Foyen: 9
*Stonefalls: 76
*Deshaan: 67
*Shadowfen: 64
*Eastmarch: 52
*The Rift: 73

Quest for all factions
*Coldharbour: 32
*Craglorn: 18
*Cyrodill: 566

Quest by Guild
*Fighters Guild: 5
*Mages Guild: 8
*Undaunted: Unknown
  Reply With Quote
10/29/14, 04:22 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
If I have to make it only using the XML, it would look like this:
Lua Code:
  1. <GuiXml>
  2.     <Controls>
  3.         <TopLevelControl name="QuestLurkerBook" clampedToScreen="true" hidden="true">
  4.             <Dimensions x="400" y="400" />        
  5.             <Anchor point="CENTER" />
  6.             <Controls>
  7.                 <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" alpha="0.75" />
  8.  
  9.                 <Control name="$(parent)Container" inherits="ZO_ScrollContainer">
  10.                    <Anchor point="TOPLEFT" offsetY="12" />
  11.                    <Anchor point="BOTTOMRIGHT" offsetY="-12" />
  12.                 </Control>
  13.  
  14.                 <Label name="$(parent)Roll" font="ZoFontGame" color="CFDCBD" wrapMode="ELLIPSIS">
  15.                     <OnInitialized>
  16.                         local text = {
  17.                             "Aldmeri Dominion",
  18.                             "*Khenarthis Roost: 11",
  19.                             "*Auridon: 51",
  20.                             "*Grahtwood: 44",
  21.                             "*Greenshade: 50",
  22.                             "*Malabal Tor: 45",
  23.                             "*Reaper's March: 60",
  24.                             "",
  25.                             "Daggerfall Covenant",
  26.                             "*Stros M'Kai: 15",
  27.                             "*Betnikh: 9",
  28.                             "*Glenumbra: 67",
  29.                             "*Stormhaven: 70",
  30.                             "*Rivenspir: 48",
  31.                             "*Alik'r Desert: 53",
  32.                             "*Bangkorai: 47",
  33.                             "",
  34.                             "Ebonheart Pact",
  35.                             "*Bleakrock Isle: 12",
  36.                             "*Bal Foyen: 9",
  37.                             "*Stonefalls: 76",
  38.                             "*Deshaan: 67",
  39.                             "*Shadowfen: 64",
  40.                             "*Eastmarch: 52",
  41.                             "*The Rift: 73",
  42.                             "",
  43.                             "Quest for all factions",
  44.                             "*Coldharbour: 32",
  45.                             "*Craglorn: 18",
  46.                             "*Cyrodill: 566",
  47.                             "",
  48.                             "Quest by Guild",
  49.                             "*Fighters Guild: 5",
  50.                             "*Mages Guild: 8",
  51.                             "*Undaunted: Unknown",
  52.                         }
  53.                         local parent = self:GetParent():GetNamedChild("ContainerScrollChild")
  54.                         self:SetParent(parent)
  55.                         self:SetAnchor(TOPLEFT, parent, TOPLEFT, 18, 6)
  56.                         self:SetText(table.concat(text, "\n"))
  57.                     </OnInitialized>
  58.                 </Label>
  59.             </Controls>
  60.         </TopLevelControl>
  61.     </Controls>
  62. </GuiXml>

However it is not a good idea to have too much LUA code in XML (it's hard to catch bugs in there), so it would be probably better if you in OnInitialize call some function instead of direct using of lua code.

In my example I have used control which inherits ZO_ScrollContainer template. It will add scrollable window with scroll bar, so you do not need to create everything on your own. Just remember if you use this template, all controls inside should have parent and anchor set to <container_name>.."ScrollChild".

If you want to force line break in label control use new line character - "\n". I have created table from your text and then it is concatenated using the table.concat with new line character separator. So the concatenated string is something like "Aldmeri Dominion\n*Khenarthis Roost: 11\n*Auridon: 51..." (this is just a start of the string).

Preview:

Last edited by Garkin : 10/29/14 at 04:27 PM.
  Reply With Quote
10/29/14, 05:51 PM   #3
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Ok I see how to do the main text now in the window. I've tried a few different things trying to put a title above Aldmer Dominion. I wanted to center it above Aldmeri Dominion with a space between. The best I've gotten so far is in my xml below. I've tried to do it with another label but that cancels things out. I'm still playing around with it right now.

Lua Code:
  1. <Label name="$(parent)QBook" font="ZoFontBookScroll" color="CFDCBD" wrapMode="ELLIPSIS">
  2.                     <OnInitialized>
  3.                         local text = {
  4.                             "QuestLurkerBook",
  5.                             "",
  6.                             "Aldmeri Dominion",
  7.                             "*Khenarthis Roost: 11",
  8.                             "*Auridon: 51",
  9.                             "*Grahtwood: 44",
  10.                             "*Greenshade: 50",
  11.                             "*Malabal Tor: 45",
  12.                             "*Reaper's March: 60",
  Reply With Quote
10/29/14, 08:04 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
You don't have to use just one label, you can use how many controls you want. Lets make labels in LUA.

Modified XML without label:
xml Code:
  1. <GuiXml>
  2.     <Controls>
  3.         <TopLevelControl name="QuestLurkerBook" clampedToScreen="true" hidden="true">
  4.             <Dimensions x="400" y="400" />        
  5.             <Anchor point="CENTER" />
  6.             <Controls>
  7.                 <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" alpha="0.75" />
  8.                 <Control name="$(parent)Container" inherits="ZO_ScrollContainer">
  9.                    <Anchor point="TOPLEFT" offsetY="12" />
  10.                    <Anchor point="BOTTOMRIGHT" offsetY="-12" />
  11.                 </Control>
  12.             </Controls>
  13.         </TopLevelControl>
  14.     </Controls>
  15. </GuiXml>

And to the lua add function which will create labels. Each label can have set different font, alignment, color. Make sure that you call that function after addon is initialized, so for example from the EVENT_ADD_ON_LOADED. In this example I'm calling BookInit() from the slash command which toggles visibility of the main window.

Lua Code:
  1. local lastLabel
  2. local offset = 0
  3. local initialized = false
  4.  
  5. local function AddLine(text, font, align, color)
  6.     --if any argument is missing or invalid, use default values
  7.     font  = (type(font)  == "string") and font  or "ZoFontGame"
  8.     text  = (type(text)  == "string") and text  or ""
  9.     align = (type(align) == "number") and align or TEXT_ALIGN_CENTER
  10.     color = (type(color) == "table")  and color or ZO_NORMAL_TEXT
  11.    
  12.     --if text start with "*", replace it with bullet texture
  13.     text = text:gsub("^*", "|t16:16:EsoUI/Art/Miscellaneous/bullet.dds|t")
  14.  
  15.     local parent = QuestLurkerBookContainerScrollChild
  16.  
  17.     local label = WINDOW_MANAGER:CreateControl(nil, parent, CT_LABEL)
  18.     label:SetHorizontalAlignment(align)
  19.     label:SetFont(font)
  20.     label:SetText(text)
  21.     label:SetColor(color:UnpackRGBA())
  22.     label:SetDimensions(label:GetTextDimensions())
  23.     if lastLabel == nil then
  24.         label:SetAnchor(TOP, parent, TOPLEFT, 200, offset + 6)
  25.     else
  26.         label:SetAnchor(TOP, lastLabel, BOTTOM, 0, offset + 2)
  27.     end
  28.  
  29.     offset = 0
  30.     lastLabel = label
  31.  
  32.     return label
  33. end
  34.  
  35. local function AddSpace(height)
  36.     offset = offset + height
  37. end
  38.  
  39. local function BookInit()
  40.     AddLine("QuestLurker Book", "ZoFontWinH2", nil, ZO_SELECTED_TEXT)
  41.     AddSpace(20)
  42.     AddLine("Aldmeri Dominion", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  43.     AddLine("* Khenarthis Roost: 11")
  44.     AddLine("* Auridon: 51")
  45.     AddLine("* Grahtwood: 44")
  46.     AddLine("* Greenshade: 50")
  47.     AddLine("* Malabal Tor: 45")
  48.     AddLine("* Reaper's March: 60")
  49.     AddSpace(16)
  50.     AddLine("Daggerfall Covenant", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  51.     AddLine("* Stros M'Kai: 15")
  52.     AddLine("* Betnikh: 9")
  53.     AddLine("* Glenumbra: 67")
  54.     AddLine("* Stormhaven: 70")
  55.     AddLine("* Rivenspir: 48")
  56.     AddLine("* Alik'r Desert: 53")
  57.     AddLine("* Bangkorai: 47")
  58.     AddSpace(16)
  59.     AddLine("Ebonheart Pact", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  60.     AddLine("* Bleakrock Isle: 12")
  61.     AddLine("* Bal Foyen: 9")
  62.     AddLine("* Stonefalls: 76")
  63.     AddLine("* Deshaan: 67")
  64.     AddLine("* Shadowfen: 64")
  65.     AddLine("* Eastmarch: 52")
  66.     AddLine("* The Rift: 73")
  67.     AddSpace(16)
  68.     AddLine("Quest for all factions", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  69.     AddLine("* Coldharbour: 32")
  70.     AddLine("* Craglorn: 18")
  71.     AddLine("* Cyrodill: 566")
  72.     AddSpace(16)
  73.     AddLine("Quest by Guild", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  74.     AddLine("* Fighters Guild: 5")
  75.     AddLine("* Mages Guild: 8")
  76.     AddLine("* Undaunted: Unknown")
  77.  
  78.     initialized = true
  79. end
  80.  
  81. --slash command /qlb
  82. SLASH_COMMANDS["/qlb"] = function()
  83.     if not initialized then BookInit() end
  84.     QuestLurkerBook:ToggleHidden()
  85. end

Here is preview:
  Reply With Quote
10/30/14, 08:19 AM   #5
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
I wanted to test out the code and play around with it however I'm getting this error. I'm pretty sure part of it might be my slash command I been trying to figure out slash commands but I just can't seem to wrap my mind around the tutorial that they have. So with that in mind the only code I'm using is the xml and lua you suggested last. Before that was the other xml which had everything in it. I was able to play around with that one and understand it. Also I haven registered an event. When I load the addon I get no error but when I type /qlb is when I get the error below.

user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: attempt to index a nil value
stack traceback:
user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: in function 'AddLine'
user:/AddOns/QuestLurker/QuestLurkerBook.lua:40: in function 'BookInit'
user:/AddOns/QuestLurker/QuestLurkerBook.lua:83: in function 'fn'
EsoUI/Ingame/SlashCommands/SlashCommands.lua:110: in function 'DoCommand'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:1850: in function 'ChatSystem:SubmitTextEntry'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:2679: in function 'ZO_ChatTextEntry_Execute'
14406795741938050902:3: in function '(main chunk)'
(tail call): ?
  Reply With Quote
10/30/14, 03:09 PM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by zireko View Post
I wanted to test out the code and play around with it however I'm getting this error. I'm pretty sure part of it might be my slash command I been trying to figure out slash commands but I just can't seem to wrap my mind around the tutorial that they have. So with that in mind the only code I'm using is the xml and lua you suggested last. Before that was the other xml which had everything in it. I was able to play around with that one and understand it. Also I haven registered an event. When I load the addon I get no error but when I type /qlb is when I get the error below.

user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: attempt to index a nil value
stack traceback:
user:/AddOns/QuestLurker/QuestLurkerBook.lua:18: in function 'AddLine'
user:/AddOns/QuestLurker/QuestLurkerBook.lua:40: in function 'BookInit'
user:/AddOns/QuestLurker/QuestLurkerBook.lua:83: in function 'fn'
EsoUI/Ingame/SlashCommands/SlashCommands.lua:110: in function 'DoCommand'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:1850: in function 'ChatSystem:SubmitTextEntry'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:2679: in function 'ZO_ChatTextEntry_Execute'
14406795741938050902:3: in function '(main chunk)'
(tail call): ?
I'm not really sure what is on the line 18 in the code you have used, but if it is the same line 18 as in my example, error says that label control wasn't created (label == nil). I don't see a reason why label wasn't created. Did you do any changes to the code?


I have tested the code in modified version of your addon, this is the full copy of code I have used to create preview image:

QuestLurker.txt:
Code:
## APIVersion: 100009
## Title: |cFFFFB0QuestLurker|r 1.5 
## Description: QuestLurker lets you know how many quest are in the current zone you are in. This Addon will work great with other addons that let you know what quests you have finished.
## Author: |c00C000Zireko & KatKat42|r
## Version: 1.5
## SavedVariables: Que_Variables

QuestLurker.xml
QuestLurker.lua
QuestLurker.xml:
Xml Code:
  1. <GuiXml>
  2.     <Controls>
  3.         <TopLevelControl name="QuestLurker" clampedToScreen="true" mouseEnabled="true" movable="true" resizeToFitDescendents="true">
  4.             <Controls>
  5.                 <Label name="$(parent)Quest" font="ZoFontWindowTitle" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="CENTER" horizontalAlignment="CENTER">
  6.                     <Anchor point="CENTER" />
  7.                 </Label>
  8.             </Controls>
  9.         </TopLevelControl>
  10.  
  11.         <TopLevelControl name="QuestLurkerBook" movable="false" hidden="true">
  12.             <Dimensions x="400" y="400" />
  13.             <Anchor point="CENTER" />
  14.             <Controls>
  15.                 <Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" alpha="0.75" />
  16.  
  17.                 <Control name="$(parent)Container" inherits="ZO_ScrollContainer">
  18.                    <Anchor point="TOPLEFT" offsetY="12" />
  19.                    <Anchor point="BOTTOMRIGHT" offsetY="-12" />
  20.                 </Control>
  21.             </Controls>
  22.         </TopLevelControl>
  23.     </Controls>
  24. </GuiXml>

QuestLurker.lua:
Lua Code:
  1. local SV
  2. local defaults = {
  3.     ["Quest"] = {
  4.         ["offsetx"] = 0,
  5.         ["offsety"] = 0,
  6.         ["point"] = CENTER,
  7.         ["relPoint"] = CENTER,
  8.     },
  9. }
  10.  
  11. local questCount ={
  12. --Aldmeri Dominion
  13.     [179] = 51, --Auridon
  14.     [295] = 11, --Khenarthi's Roost
  15.     [181] = 44, --Grahtwood
  16.     [19]  = 50, --Greenshade
  17.     [12]  = 45, --Malabal Tor
  18.     [180] = 60, --Reaper's March
  19.  
  20. --Daggerfall Covenant
  21.     [293] = 15, --Stros M'Kai
  22.     [294] = 9,  --Betnikh
  23.     [2]   = 67, --Glenumbra
  24.     [4]   = 70, --Stormhaven
  25.     [5]   = 48, --Rivenspir
  26.     [18]  = 53, --Alik'r Desert
  27.     [65]  = 47, --Bangkorai
  28.  
  29. --Ebonheart Pact
  30.     [110] = 12, --Bleakrock Isle
  31.     [111] = 9,  --Bal Foyen
  32.     [9]   = 76, --Stonefalls
  33.     [11]  = 67, --Deshaan
  34.     [20]  = 64, --Shadowfen
  35.     [16]  = 52, --Eastmarch
  36.     [17]  = 73, --The Rift
  37.  
  38. --All other quest/other
  39.     [155] = 32, --Coldharbour
  40.     [353] = 18, --Craglorn
  41.     [38] = 566, --Cyrodiil
  42.  
  43. --Guild Quest
  44.     --["Fighters Guild"] = 5,
  45.     --["Mages Guild"] = 8,
  46. }
  47.  
  48. local lastLabel
  49. local offset = 0
  50. local initialized = false
  51.  
  52. local function AddLine(text, font, align, color)
  53.     --if any argument is missing or invalid, use default values
  54.     font  = (type(font)  == "string") and font  or "ZoFontGame"
  55.     text  = (type(text)  == "string") and text  or ""
  56.     align = (type(align) == "number") and align or TEXT_ALIGN_CENTER
  57.     color = (type(color) == "table")  and color or ZO_NORMAL_TEXT
  58.  
  59.     --if text start with "*", replace it with bullet texture
  60.     text = text:gsub("^*", "|t16:16:EsoUI/Art/Miscellaneous/bullet.dds|t")
  61.  
  62.     local parent = QuestLurkerBookContainerScrollChild
  63.  
  64.     local label = WINDOW_MANAGER:CreateControl(nil, parent, CT_LABEL)
  65.     label:SetHorizontalAlignment(align)
  66.     label:SetFont(font)
  67.     label:SetText(text)
  68.     label:SetColor(color:UnpackRGBA())
  69.     label:SetDimensions(label:GetTextDimensions())
  70.     if lastLabel == nil then
  71.         label:SetAnchor(TOP, parent, TOPLEFT, 200, offset + 6)
  72.     else
  73.         label:SetAnchor(TOP, lastLabel, BOTTOM, 0, offset + 2)
  74.     end
  75.  
  76.     offset = 0
  77.     lastLabel = label
  78.  
  79.     return label
  80. end
  81.  
  82. local function AddSpace(height)
  83.     offset = offset + height
  84. end
  85.  
  86. local function BookInit()
  87.     AddLine("QuestLurker Book", "ZoFontWinH2", nil, ZO_SELECTED_TEXT)
  88.     AddSpace(20)
  89.     AddLine("Aldmeri Dominion", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  90.     AddLine("* Khenarthis Roost: 11")
  91.     AddLine("* Auridon: 51")
  92.     AddLine("* Grahtwood: 44")
  93.     AddLine("* Greenshade: 50")
  94.     AddLine("* Malabal Tor: 45")
  95.     AddLine("* Reaper's March: 60")
  96.     AddSpace(16)
  97.     AddLine("Daggerfall Covenant", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  98.     AddLine("* Stros M'Kai: 15")
  99.     AddLine("* Betnikh: 9")
  100.     AddLine("* Glenumbra: 67")
  101.     AddLine("* Stormhaven: 70")
  102.     AddLine("* Rivenspir: 48")
  103.     AddLine("* Alik'r Desert: 53")
  104.     AddLine("* Bangkorai: 47")
  105.     AddSpace(16)
  106.     AddLine("Ebonheart Pact", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  107.     AddLine("* Bleakrock Isle: 12")
  108.     AddLine("* Bal Foyen: 9")
  109.     AddLine("* Stonefalls: 76")
  110.     AddLine("* Deshaan: 67")
  111.     AddLine("* Shadowfen: 64")
  112.     AddLine("* Eastmarch: 52")
  113.     AddLine("* The Rift: 73")
  114.     AddSpace(16)
  115.     AddLine("Quest for all factions", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  116.     AddLine("* Coldharbour: 32")
  117.     AddLine("* Craglorn: 18")
  118.     AddLine("* Cyrodill: 566")
  119.     AddSpace(16)
  120.     AddLine("Quest by Guild", "ZoFontWinT1", nil, ZO_HIGHLIGHT_TEXT)
  121.     AddLine("* Fighters Guild: 5")
  122.     AddLine("* Mages Guild: 8")
  123.     AddLine("* Undaunted: Unknown")
  124.  
  125.     initialized = true
  126. end
  127.  
  128. --Function for pulling up zone and how many quests, ZoneQuestBook (coming in the future)
  129.  
  130. --Code for zone and the number of quest which are in the zone.
  131. local function ZoneQuest()
  132.     local zoneIndex = GetCurrentMapZoneIndex()
  133.     local numQuests = questCount[zoneIndex]
  134.     if numQuests ~= nil then
  135.         QuestLurkerQuest:SetText(zo_strformat("<<1>>: <<2>>", GetUnitZone("player"), numQuests))
  136.         QuestLurker:SetHidden(false)
  137.     else
  138.         QuestLurker:SetHidden(true)
  139.     end
  140. end
  141.  
  142. --New Function will be a counter to count the quest up you have done. Currently working on this. QuestCounter name.
  143.  
  144. local function OnMoveStop(self)
  145.     local valid, point, _, relPoint, offsetx, offsety = self:GetAnchor(0)
  146.     if valid then
  147.         SV.Quest.point = point
  148.         SV.Quest.relPoint = relPoint
  149.         SV.Quest.offsetx = offsetx
  150.         SV.Quest.offsety = offsety
  151.     end
  152. end
  153.  
  154. local function OnAddOnLoaded(eventCode, addon)
  155.     if addon == "QuestLurker" then
  156.         EVENT_MANAGER:UnregisterForEvent("QuestLurker", EVENT_ADD_ON_LOADED)
  157.  
  158.         SV = ZO_SavedVars:New("Que_Variables", 2, nil, defaults)
  159.         QuestLurker:SetAnchor(SV.Quest.point, nil, SV.Quest.relPoint, SV.Quest.offsetx, SV.Quest.offsety)
  160.  
  161.         QuestLurker:SetHandler("OnMoveStop", OnMoveStop)
  162.  
  163.         SLASH_COMMANDS["/qlb"] = function()
  164.             if not initialized then BookInit() end
  165.             QuestLurkerBook:ToggleHidden()
  166.         end
  167.  
  168.         ZoneQuest()
  169.     end
  170. end
  171.  
  172. EVENT_MANAGER:RegisterForEvent("QuestLurker", EVENT_ADD_ON_LOADED, OnAddOnLoaded)

Last edited by Garkin : 10/30/14 at 03:20 PM.
  Reply With Quote
10/30/14, 03:47 PM   #7
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Now I'm using and exact copy to make sure I got everything correct. But I'm still getting the error. I was doing my code a little different however I must have been doing everything correct because it's the exact same place but instead of line 18 it's line 65 with your modified code.

Here is the Error

user:/AddOns/QuestLurker/QuestLurker.lua:65: attempt to index a nil value
stack traceback:
user:/AddOns/QuestLurker/QuestLurker.lua:65: in function 'AddLine'
user:/AddOns/QuestLurker/QuestLurker.lua:87: in function 'BookInit'
user:/AddOns/QuestLurker/QuestLurker.lua:164: in function 'fn'
EsoUI/Ingame/SlashCommands/SlashCommands.lua:110: in function 'DoCommand'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:1850: in function 'ChatSystem:SubmitTextEntry'
EsoUI/Ingame/ChatSystem/ChatSystem.lua:2679: in function 'ZO_ChatTextEntry_Execute'
14406795741938050902:3: in function '(main chunk)'
(tail call): ?
  Reply With Quote
10/30/14, 03:54 PM   #8
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Never Mind LOL it was another file conflicting with it. I figured it out after tinkering some more and opened the file then I realized I accidently saved another lua file in the same place. Once I deleted it and made sure everything was saved correctly it started working.
  Reply With Quote
03/29/15, 03:47 PM   #9
awesomebilly
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 23
Garkin

Hey Garkin,

Removing or updating these labels, what would you suggest?
  Reply With Quote
03/29/15, 09:26 PM   #10
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by awesomebilly View Post
Hey Garkin,

Removing or updating these labels, what would you suggest?
I'd use control pool for that.

http://esodata.uesp.net/current/src/...tpool.lua.html
http://esodata.uesp.net/current/src/...lates.lua.html
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Probably a very Simple XML question but need some help here


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