• 0

    posted a message on LibGuildBankComm-1.0 Official Thread
    Double fire of _CLOSED events can be fixed by ignoring the second time it happens.

    Generally, the easiest is to register for the _OPENED event and unregister the _CLOSED event when you receive a _CLOSED event. Similarly, register for the _CLOSED event during the _OPENED event. You don't have to unregister the _OPENED event (and you shouldn't at all) because it can fire again if the user reopens said frame (mail/bank/guildbank) without the _CLOSED firing by clicking on it again.
    Posted in: Libraries
  • 0

    posted a message on Modyfing Blizzards Frames?
    Some guilds use it.

    Never make assumptions about your user.
    Posted in: Need Help?
  • 0

    posted a message on Modyfing Blizzards Frames?
    All 3 are valid methods, depending on

    A) How much data you want to add to the frame
    B) How complicated the code is to achieve this
    C) Whether the default implementation is sufficient for your needs

    You do not really have to worry about tainting the Chat Channels frame for chat and voice chat because nothing in there needs to be secure or protected from taint (none of those things affect combat).
    Posted in: Need Help?
  • 0

    posted a message on AceDB - Strange results
    Furthermore, your loop is flawed. You told it to create

    KLSdb.profile[actionID] = {key1 = key1}

    specifically if key1 isn't nil, for every actionID between 1-120. If you didn't want the holes, you should be using

    table.insert(KLSdb.profile, {key1 = key1})

    -----------------
    Furthermore, your hole removing code loop is flawed:

    -- Remove non defined actions for the space and syntax sake
    for actionID2=1,#KLSdb.profile do
        if not KLSdb.profile[actionID2] then
           table.remove(KLSdb.profile,actiondID2)
        end
    end
    Your loop goes forwards, instead of backwards, so for every hole you remove, you are skipping a hole. Example, you have a table {1, 2, nil, nil, 5, 6, nil, nil, nil, 10}

    If you apply your loop on this table, you're doing this:
    When actionID2 is 1: Do nothing
    When actionID2 is 2: Do nothing
    When actionID2 is 3: Result table: {1, 2, nil, 5, 6, nil, nil, nil, 10}
    When actionID2 is 4: Do nothing, because the "5" entry is now the 4th
    When actionID2 is 5: Do nothing, because the "6" entry is now the 5th
    When actionID2 is 6: Result table: {1, 2, nil, 5, 6, nil, nil, 10}
    When actionID2 is 7: Result table: {1, 2, nil, 5, 6, nil, 10}
    When actionID2 is 8: Do nothing
    When actionID2 is 9: Do nothing
    When actionID2 is 10: Do nothing

    Resulting table: {1, 2, nil, 5, 6, nil, 10}
    What you wanted: {1, 2, 5, 6, 10}

    Furthermore, the loop may not even work at all. The # operator when used on a table, returns an integer N such that t[N] is non-nil, and t[N+1] is nil. Thus, #{1, 2, nil, nil, 5, 6, nil, nil, nil, 10} can return any of the following integers: 2, 6, 10. However, if you really did create a table this way like that and print it:

    print(#{1, 2, nil, nil, 5, 6, nil, nil, nil, 10})

    It would print 10, because all 10 are in the array portion of the Lua table. If you didn't create the Lua table in array form and inserted the 5 entries one by one by code, then it could possible return 2, 6 or 10, depending on the order of insertion. Typically, only the "1" and "2" would be in the array portion, and the 5, 6, 10 entries would be in the hashed portion, and #t would return 2 on it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceDB - Strange results
    Quote from Fulgerul
    So my question to the ACEdb gurus here is basicly, why is the code in the first example creating a nil value even if I explicitly tell it not to do _anything_ unless key1 is defined ?

    Thanks in advance for your patience,
    Alex


    This is Lua behavior. A nil value in a table means it doesn't exist, and nils are written to file only if it will help promote table memory use internally in its structure when next loaded.

    Tables in Lua have 2 portions, hashed and array portions. The array portion starts from [1] to [n], and the hashed portion is everything else that doesn't like in between 1-n. Accessing the array portion is slightly faster. The nils in the written table entries ensure those parts are loaded into the array portion of the table, rather than in the hashed portions.

    If you didn't understand any of that, you only need to know that the nil values are exactly that - nil values that don't exist. They are just fillers in the array portion of the Lua table internally and to the language specification for tables, they don't exist to the user.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Question About the .pkgmeta File
    You shouldn't be pulling libraries from the EPGP repo at Google Code.

    If those libraries are actually hosted and maintained on wowace, then you should pull them directly from wowace repos.
    Posted in: Need Help?
  • 0

    posted a message on Libraries with externals in .pkgmeta
    Hmm this is interesting. I checked the Release/Beta/Alpha zips of some of those addons you mentioned, and you are correct. Release/Beta tagged zips made by the packager has AceGUI-3.0 embedded inside AceGUI-3.0-SharedMediaWidgets, but Alpha zips do not.

    This does look like a packager bug. I'll ask around about it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Libraries with externals in .pkgmeta
    I downloaded TidyPlates_ThreatPlates_v5.1.7.zip, the author is embedding them incorrectly, and is not using code versioning system (on Curseforge at least) and thus is not packaged by pkgmeta. The zips are packed and uploaded manually by the author.

    I downloaded Grid-r1433.zip, it embedded AceGUI-3.0-SharedMediaWidgets correct, there are no duplicate copies of AceGUI in the zip. The packaging is correct and is done by pkgmeta.

    So, I do not really see the problem that the original poster is saying at all.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Postal (was GMail2): Updated
    1. You don't need to link mats into a mail. You can ask your guildie to look at the Guild panel, change the dropdown to "Professions" and he can view the professions tab of any person in your guild, what they can craft, and the mats of every recipe. You can also see a "guild crafting" version of every guild member combined into one, and check who can craft a certain recipe.

    2. Bulk mailing features will not be supported because I do not believe in encouraging spam, or for bots/hackers to utilize in spamming mail. You can try out the MassMailer addon

    http://www.wowace.com/addons/massmailer/
    http://wow.curse.com/downloads/wow-addons/details/massmailer.aspx
    http://www.wowinterface.com/downloads/info16547-MassMailer.html

    for this purpose. From what I know though, Mass-mailing features are actively prevented by Blizzard, and most mass mailing addons are more or less dead or require 1 click per mail at the least.
    Posted in: General AddOns
  • 0

    posted a message on Looting Event/System
    You're out of luck. The game does not tell you when or if other players clicked the cauldron to pick up a flask. The game only tells you when you pick yours up.

    It's the same with healthstones and mage tables. Otherwise when a mage table is summoned, you would see about 70 "X has received [Food]" spam.
    Posted in: Need Help?
  • 0

    posted a message on Store Gift Card Restock?
    Perhaps there can be a petition for lower dollar denominations of cash. I'm not sure how much more complicated it is for Curse to just disburse cash as opposed to Amazon gift certs.
    Posted in: General Chat
  • 0

    posted a message on Store Gift Card Restock?
    I'm curious. Isn't it easier (and faster) to get Curse to pay to your PayPal, then you can use the cash in it to buy stuff on Amazon?
    Posted in: General Chat
  • 0

    posted a message on Postal (was GMail2): Updated
    Quote from mstieler
    Echoing part of the sentiment above (regarding 70 pages), but I'm wondering if there's a way to remove specific alts from Postal's Blackbook. I recently race-changed two characters and deleted a third, but their names still show up in Postal.


    There is a "Delete" submenu 0.5cm away from the list of names of all the alts.
    Posted in: General AddOns
  • 0

    posted a message on Need help with some errors
    First error is because your defaults should have a "defaults.char.logs = {}" entry so that its a table, rather than nil. (I don't have to spell everything out, do I? -.- )

    The second error is even more obvious.

    260: allManaValues = {}
    273: local allManaSum

    So the loop that iterates over #t which is #allManaValues doesn't work at all as it has a size of 0, and allManaSum remains nil. Your loop won't even work even if it has a non-zero size as the initial value is nil, and "allManaSum = allManaSum + v" would fail.

    allManaValues = {} should be at the end of the function to wipe it out after you used it.

    Come on..... simple programming logics, I didn't even look at your code longer than 1 minute.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need help with some errors
    Because when you do

        self.db.char.logs = {
            combat = {
                date = date(),
                data = {data = allManaValues}
            }
        }  
    You are overwriting self.db.chars.logs with a new table every time you enter combat. The old contents of self.db.chars.logs, whatever it contained, is gone forever.

    Perhaps you want something more like

    self.db.chars.logs[#self.db.chars.logs + 1] = {
        date = date(),
        data = allManaValues,
    }
    Now when you exit combat, you need to create a new allManaValues table (and not wipe it because self.db.chars.logs[#self.db.chars.logs] refers to the same table):

    allManaValues = {}

    for the next combat. Over time, you will then have
    self.db.chars.logs[1]
    self.db.chars.logs[2]
    self.db.chars.logs[3]
    ...
    where each of these has a .date and .data[]
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.