• 0

    posted a message on can't set icon in just 1 zone. It shows in all zones and continents. can u help?
    I want to show icon in just 1 zone but it always shows in all map. I dunno why???
    When i cancel this line
    MyAddOn.worldmap.icon:SetAllPoints()
    it shows nothing.
    Can anyone help me with this? Do I miss sth???
        MyAddOn.waypoint = {}
    	MyAddOn.waypoint.c,MyAddOn.waypoint.z = GetCurrentMapContinent (), GetCurrentMapZone()	
    	MyAddOn.waypoint.x,MyAddOn.waypoint.y = 0.5256,0.3042
    
    	MyAddOn.worldmap = CreateFrame("Button", nil, WorldMapDetailFrame)
    	MyAddOn.worldmap:SetHeight(12)
    	MyAddOn.worldmap:SetWidth(12)
    	MyAddOn.worldmap.icon = KillerGuide.worldmap:CreateTexture("ARTWORK")
    	MyAddOn.worldmap.icon:SetAllPoints()
    	MyAddOn.worldmap.icon:SetTexture("Interface\\AddOns\\MyAddOn\\Images\\GoldGreenDot")
    
    	Astrolabe:PlaceIconOnWorldMap (WorldMapDetailFrame, MyAddOn.worldmap, MyAddOn.waypoint.c, MyAddOn.waypoint.z, MyAddOn.waypoint.x, MyAddOn.waypoint.y)
    Posted in: Lua Code Discussion
  • 0

    posted a message on where to start making an arrow to show the direction like quest helper?
    I wanna create add-on like to set the coordinate and display the arrow to show the direction but i dunno where to start cuz when i look at questHelper, i really confuse.
    Posted in: Lua Code Discussion
  • 0

    posted a message on getting nil value from lua and need help debugging
    It's work, thx for reply everyone
    Posted in: Lua Code Discussion
  • 0

    posted a message on getting nil value from lua and need help debugging
    it still does not work
    and coming with new popup error like this: chk the attach file

    attempt to index field '?' (a nil value)

    func = function(info)
    	local c = info.arg
    	opts1["Link_"..index.."_"..i.."_"..c].get = function()
    	    
             return L["CHAPTER_LINK_"..index.."_"..i.."_"..c]
        end --<<<< error this line
    	if opts1["Link_"..index.."_"..i.."_"..c].hidden == true then
    	    
             opts1["Link_"..index.."_"..i.."_"..c].hidden = false
    	else
    		 opts1["Link_"..index.."_"..i.."_"..c].hidden = true
    	end
    end,

    Posted in: Lua Code Discussion
  • 0

    posted a message on getting nil value from lua and need help debugging
    Quote from danielbarron »

    Looks like you're setting c in the for..do..end loop. Then outside the loop you are using c which will be nil.


    This part is still inside the loop, isn't it?
    opts1["Button_"..index.."_"..i.."_"..c] = {
    				name = "Get URL",
    				type = "execute",
    				width = "half",
    				func = function()
                       opts1["Link_"..index.."_"..i.."_"..c].get = function()
    				   return L["CHAPTER_LINK_"..index.."_"..i.."_"..c]
    				end
    			    if opts1["Link_"..index.."_"..i.."_"..c].hidden == true then
    						opts1["Link_"..index.."_"..i.."_"..c].hidden = false
    					else
    						opts1["Link_"..index.."_"..i.."_"..c].hidden = true
    					end
    				end,


    I really confuse with closure. If someone explain will appreciate
    Posted in: Lua Code Discussion
  • 0

    posted a message on getting nil value from lua and need help debugging
    I can't get the url from the first option (important node). I can get the link only from the last node (?????). see pics for more info.

    [font=Verdana]attempt to index upvalue 'c' (a nil value)[/font]


        Chk_Link = L["CHAPTER_LINK_AMOUNT_"..index.."_"..i]
    	for c=1,Chk_Link do
    		opts1["Link_"..index.."_"..i.."_"..c] = {
    				type = "input",
    				name = "Link",
    				get = function()
    					local x = ""
    					return x
    				end,
    				set = function()
    				end,
    				width = "double",
    				order = L["CHAPTER_OL_"..index.."_"..i.."_"..c],
    				hidden = true,
    		}
    		opts1["Button_"..index.."_"..i.."_"..c] = {
    				name = "Get URL",
    				type = "execute",
    				width = "half",
    				func = function()
    error at this line>>          opts1["Link_"..index.."_"..i.."_"..c].get = function()
    				    return L["CHAPTER_LINK_"..index.."_"..i.."_"..c]
    				end
    			if opts1["Link_"..index.."_"..i.."_"..c].hidden == true then
    						opts1["Link_"..index.."_"..i.."_"..c].hidden = false
    					else
    						opts1["Link_"..index.."_"..i.."_"..c].hidden = true
    					end
    				end,
    		}
    	end
    Posted in: Lua Code Discussion
  • 0

    posted a message on can we change size of the ( type = "execute") button
    does it possible to adjust the size of the button by myself?


    free = {
    name = "asdfasdfasdjfks;adfjkas;dfjkl",
    type = "execute",
    desc = "Execution test",
    func = function()
    ...
    end,

    },
    Posted in: Lua Code Discussion
  • 0

    posted a message on how can i set text to bold or italic in add-on wow?
    sry to pester but can u give me an example code? i'm new - -'
    Posted in: Lua Code Discussion
  • 0

    posted a message on how can i set text to bold or italic in add-on wow?
    for color i know that i have to set sth like |cff + color code like (7fff7f) msg + |r

    and wat bout bold and italic?
    anyone know???
    Posted in: Lua Code Discussion
  • 0

    posted a message on how do i show msg on "input" type of Ace Framework before get the input ?
    ty rodrick. I can show text right now :). I'm a newbie in making warcraft add-on so ty so muck :D
    Posted in: Lua Code Discussion
  • 0

    posted a message on how do i show msg on "input" type of Ace Framework before get the input ?
    Input = {
    type = "input",
    name = "Name",
    desc = "Description",
    ...
    },

    Is that possible to set msg to the text box before get the input from user?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.