CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Attempt to index field "?" (a nil value)
    It should be a regular list table; apparently I misread the manual, and if the list has holes then my code can cause troubles, though for now I have no clue how I managed to get holes in it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Attempt to index field "?" (a nil value)
    Now this one error got me completely stumped..
    Apparently its caused by this simple code:

      if pdb.prio then
        for i = 1, #pdb.prio do
          pdb.prio[i].preset = pdb.prio[i].preset or 1 -- error here
          pdb.prio[i].value = pdb.prio[i].value or 0
        end
      end


    How is this even possible? pdb.prio has to be a table if it gets to that line, and pdb.prio[i] has to be non-nil by definition of #pdb.prio. What could cause that problem?
    Also, I can't reproduce it myself, I'm getting it reported by a few users; I asked one to send me the WTF/... file and it seemed alright =\
    Posted in: Lua Code Discussion
  • 0

    posted a message on LFRBrowseFrame scroll bar
    I'm sure you've noticed that the default raid browser (the old one) is now missing a scroll bar, showing only the first 19 players. Apparently its because the scroll frame isn't anchored to anything. The XML sets the anchors, but they disappear for some reason - and I couldn't find why, looking at the code. Setting the anchors manually with /run commands fixes the problem, though:
    /run LFRBrowseFrameListScrollFrame:SetPoint("TOPLEFT",LFRBrowseFrameListButton1,"TOPLEFT",0,0)
    /run LFRBrowseFrameListScrollFrame:SetPoint("BOTTOMRIGHT",LFRBrowseFrameListButton19,"BOTTOMRIGHT",6,-5)

    Did anyone find what's causing the anchors to disappear?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Ultraxion button (heroic will), how to move it?
    If anyone still needs this, you can move it with
    /run ExtraActionButton1:SetPoint("CENTER",0,100)
    Replacing 0,100 with whatever you need. The artwork is attached to the button, so it will move as well.
    If you don't see the button at all (some addons hide it), here's a macro you can use:
    /run local b=ExtraActionButton1 b:SetParent(UIParent) b:SetPoint("CENTER",0,-200) b:Show()
    Posted in: Lua Code Discussion
  • 0

    posted a message on Profession leveling addon
    Leveling a profession on one of my alts for like a 100th time, I once again realize that existing profession leveling guides have several flaws. First, they're usually written in english, so if you're not using an english client, you will have to translate all required items before searching for them on AH. Second, most importantly, auction house prices and availability vary so much that it's impossible to make a guide that would optimize your budget.

    However, its all easily possible with an addon. So here's my idea, though I wanted to make sure such an addon doesn't exist already.

    We select a profession, and click "optimize". The addon searches the auction house and chooses the most optimal way to level a profession. Then, perhaps it should make buying individual items easier - e.g. if we need 120 ore, it should figure out which stacks to buy (there should be some kind of tradeoff so we don't end up buying 120 stacks of 1 ore because its 2% cheaper) and.. well I'm not sure how much you're allowed to modify auction UI, but surely there's something one can do to simplify that. Last but not least, it would show a list of things we need to craft (and possibly recipes we need to buy, we could configure if we're allowed to use non-trainer recipes).

    I'm sure these ideas aren't new, but I couldn't find any addon that would do that. Besides, it should also be possible in web form, since the api to get an auction dump is available.
    Posted in: Addon Ideas
  • 0

    posted a message on NotifyInspect
    According to http://wowprogramming.com/docs/api/NotifyInspect, I should be able to call GetInventoryItemLink right away and get correct item info. However, when I do that, I only get like half of the items, while the rest of the slots appear to be empty.
    How do I detect when the info actually arrives? Catching INSPECT_READY doesn't seem to do the trick, either.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hide Target/Focus Buffs+Debuffs
    You don't need to hide them on every frame, and especially don't change OnUpdate of UIParent - who knows what it might be needed for.
    Usually what's done is the unneeded elements are hidden once, and their OnShow handler is changed to re-hide them.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Packager issues
    Somehow I can't get my addon to package.
    I commit the changes as usual, tag repo, and nothing happens.
    I tried tagging it again and again, changed repo type to alpha/beta/release, nothing works. Packager status isn't showing anything either. Is the packager offline or something?
    Posted in: General Chat
  • 0

    posted a message on ReforgeLite: calculate an optimal way to reforge your items
    =[
    Thats localization problem. You can fix it by going to addon localization page and changing what you think needs to be changed, then when I update the project it will get fixed automatically. The phrases you are looking for are named "Hit", "Haste", "Exp" etc.
    I don't know any languages besides Russian/English so I can't check if translations are correct, and I guess I overlooked the long strings when I confirmed them.
    http://www.wowace.com/addons/reforgelite/localization/
    Posted in: General AddOns
  • 0

    posted a message on Mark bag items
    What I did was call EnumerateFrames once when loading, and save all frames derived from ContainerFrameItemButtonTemplate in a list.
    Then I hook the ContainerFrameItemButton_OnLoad and add the newly created frame to the list. So, unless your custom template overwrites OnLoad and doesn't call the original one (does that even work that way, or templates call their parent OnLoad first like class constructors do in c++?), I will catch it.

    Then, when I need to update the icons, I just go through the list.
    Posted in: Lua Code Discussion
  • 0

    posted a message on loadstring for in "customizable messages"
    I know, but the returned function would accept arguments, which is what the OP was trying to work around.
    If userString is "print (y, z, x)" then loadstring would return a function that, given 3 arguments, prints them in the specified order. In other words, rewriting example C:

    local function test (...)
      local args = {...}
      local func = loadstring ("return function (args) print (args[1], args[5], args[6]) end") ()
      func (args)
    end
    
    test ("Hi", "There", "Mister", "Smith", "Good", "Afternoon")
    -- should print the intended "Hi Good Afternoon"


    Except you probably want to store the function returned by the function returned by loadstring (func in this example) for efficiency reasons.
    Posted in: Lua Code Discussion
  • 0

    posted a message on loadstring for in "customizable messages"
    Couldn't you do

    loadstring ("return function(x,y,z) " .. userString .. " end")

    And then evaluate it once to get the function you need?
    Posted in: Lua Code Discussion
  • 0

    posted a message on prog question: create GUI
    Depending on which elements you need, you can look at how AceGUI does them and figure out which parts are irrelevant. I have a couple addons that make some widgets, you can look at ReforgeLite, there's a separate file for GUI elements.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hide Target/Focus Buffs+Debuffs
    First, why are you changing OnUpdate for UIParent, what if something else is using it?
    Why numBuffs and numDebuffs aren't locals?
    It would help if you mentioned which exact line was giving problems, since "line 127" doesn't say much if we don't have the whole file.
    Edit: bah ninja
    Posted in: Lua Code Discussion
  • 0

    posted a message on Mark bag items
    Thanks that worked perfectly.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.