• 0

    posted a message on Help with addon code fixing
    Hehe, rather than storing the player names, that new code just looks it up from scratch on every item. But hey, if it works, it works! And at worst it's only looking over 40 entries.

    And yes, replacing GetName with GetUnitName would have been wrong for that code, don't do that.
    Posted in: AddOn HELP!
  • 0

    posted a message on Help with addon code fixing
    Man, that getglobal() is so old and rotten it smells worse than dead fish. I didn't even realize it was still in the API until seeing your post made me go look it up. (I woulda thought that deprecated stuff would get removed in 6.0.)

    I haven't looked at the API descriptions for AssignLoot, but on teh assumption that it's correct, I would recommend looking at the code which creates those buttons. It looks like the only place where the original author is keeping track of player names is in the graphical labels on the buttons themselves. I bet if you find out how those labels are being built, that will answer your question.

    Without having looked at the code myself, I'm betting that: (1) the button labels are built around the player name, not the full player+realm name, and that (2) in order to get the AssignLoot call to work, you'll have to make the button labels include the realm name.

    The proper way to do this would be to keep the player's full toon+realm name in a hidden field, and the visible button label separate. Have the AssignLoot call always use the hidden full name, and that way you can choose what to display in the labels without borking up functionality. It also means less "ripple" effect when, say, Blizzard comes along and makes the name suddenly include more information. :-) However, making that change to old code would probably be more effort than simply adjusting an existing, maintained addon...

    ...or learning enough Lua to code it up yourself. Scratching an itch is how most of us got started!
    Posted in: AddOn HELP!
  • 0

    posted a message on I need to help in locating and restoring addon settings file
    Addons can only ever save things in one of two SV files: the one for the account, or the one for a specific character+realm. Addons can save stuff in either one of those files, or both; it's the choice of the addon developer. From your post, it sounds like XPerl only uses the one for the account.

    Those files will always be under the WTF folder tree. The game enforces this. Addons can't even change the name of their SV file, let alone its location.

    Where things get funky is when the WTF folder tree itself can be in strange places or multiple pieces due to Windows virtual store, UAC, the phase of the moon, and bugs in any of the above. Best thing to do is to install WoW someplace that's not treated "special" by Windows; so something like C:/Games/WoW or C:/my own shit goes here/go away microsoft/world of warcraft or bury it under X:/SecretPornStash/By-Category/Squirrels/WorldOfWarcraft, etc. Just don't put it under C:/Program Files or C:/Users/...../Games or anything like that, Windows will have a fucking field day corrupting all your dataz.

    Yes, the real folder path names will have backslashes instead of normal forward slashes, but the forum markup on this site is doing Strange Things with backslashes. I blame it on ebola.

    If your WoW is currently installed in one of those bad places, just try moving the entire WoW folder to the new location. There's a good chance you don't need to actually reinstall the game.

    If you're trying to hunt down where a particular SV file is, the simplest approach is to pull up Windows Explorer (the file manager, not the web browser) and just use the search tool on whichever hard drive you installed WoW on. Look for "XPerl.lua". (There are faster and better ways, but I don't know what other tools you're comfortable with using, and the file manager is always there.)

    You'll need to be careful to not confuse the per-account SV files with the per-character SV files. Look at the containing folder names carefully before you move them around.

    In the worst case, once you move your WoW installation to some non-special location, you may have to start with the default XPerl settings and redo them from scratch.


    (Also, on an unrelated note, you don't need to save the Cache folder. In fact, deleting it from time to time can help solve and prevent certain kinds of problems. Only the Interface and WTF folders really need preserving, along with Screenshots if that's where it shows up.)
    Posted in: AddOn HELP!
  • 0

    posted a message on Retaining tag/branch history on SVN -> GIT
    Take a look at

    http://www.wowace.com/wiki/repositories/repository-faq/#w-how-does-the-packager-know-whether-a-tag-is-a-release

    and construct your tags so that they don't match that pattern. I've not tried it, but I'd expect that this would let you apply tags without generating packages.
    Posted in: General Chat
  • 0

    posted a message on Dependency Missing
    Quote from Owenkc
    According to the web site KTQ needs GnomeWorks, DataStore, Auctioneer and Altoholic, all of which I have installed (at latest versions)


    If you bring up the in-game addons list and hover the mouse over the addon name (gold text on the left), there should be a small window popping up with the dependencies. I can't remember if it highlights the missing ones anywhere; I don't have an active account or I'd check. If so, that'll at least let you know which specific dep is missing.

    If you installed the addon via Curse Client, it should have installed the dependencies in the right place also. If not, then my offhand guess is that you might have unpacked one or more of the addons in the wrong folder.

    You can also bring up a file manager, get to your WoW installation folder, and then look under the Logs folder for a file named FrameXML.log. This contains errors from the addon system which happen before a character is logged into the world "far enough" to pop up error windows in-game. Missing deps may also be listed here, but again I apologize for guessing from memory.
    Posted in: Need Help?
  • 0

    posted a message on BadBoy: Block chinese/korean/other kanji
    Quote from marat569
    literally as a programmer myself there is no reason NOT to.


    There are plenty of reasons in post #2. If you don't personally agree with them, that's fine, but "you don't agree" isn't sufficient reason to force a volunteer to do what you want.

    If you're a programmer yourself, then change the code yourself and maintain a local version. If it's one function and one if statement then a programmer should have no trouble maintaining that in a simple diff/patch file. It's even trivial to automatically apply the patch after updating a new version of the upstream addon, especially if the patch is that simple.
    Posted in: Addon Ideas
  • 0

    posted a message on Packager issues
    Quote from Lombra
    Is something wrong now? SVN server seems down or something. Commit fails with:
    Error: Commit failed (details follow):
    Error: Unable to connect to a repository at URL
    Error: 'svn://svn.curseforge.net/wow/vortex/mainline/trunk'
    timed out

    Edit: Guess it's technically not related to the packager.


    Seeing the same thing here, trying to update some old addons of mine:

    OpenSSH_6.4, OpenSSL 1.0.1f 6 Jan 2014
    debug1: Reading configuration data /home/<me>/.ssh/config
    debug1: /home/<me>/.ssh/config line 6: Applying options for *.curseforge.net
    debug1: /home/<me>/.ssh/config line 33: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to svn.curseforge.net [190.93.246.105] port 22.
    debug1: connect to address 190.93.246.105 port 22: Connection timed out
    <timeout, repeat, etc>

    and then it just hangs. I can ping the address, but that's the only sign of life.
    Posted in: General Chat
  • 0

    posted a message on Explaining this SetScript to an idiot.
    Quote from Phanx
    The function could just as well be named "ILoveJustinBieber"


    I hear that in game patch 5.5, naming your functions like that will trigger new mechanical functionality.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Explaining this SetScript to an idiot.
    Phanx hit all the high points, I'll just tag this part:
    Quote from theultimateend
    if temp ~=  nil then
        self.libs[major] = temp    -- does nothing
    else
        self.libs[major] = {}
    end


    If that variable actually leads somewhere then we reaffirm the variable (couldn't you just put end here)?


    Leaving aside the syntax issue, sorta-yes. If the code really was doing an actual if-then-end, then the assignment of a thing to itself would be pointless.

    The reason it's done here is that the construction some_var = some_var or value is a very common Lua idiom. If some_var already has a value, then it doesn't change. If it has no value, then it gets a default one. The trick is that in most languages, X or Y is just a boolean operation evaluating to true or false. In Lua, it evaluates to either actual X or actual Y, so you get the values themselves.

    In this case, it's also possible to look at the code and see that this line is the only place where any "real" values at all are assigned to "self.libs[major]". If the function gets called more than once, only the first time results in the table being created and assigned.

    Otherwise if it doesn't lead anywhere (ie. returns a nil value) it creates a table out of that. For what reason I'm not sure (just for example I assume).


    The table created there is what gets filled out by the calling code to eventually become a library table. But as others have said, you don't need to understand how internal combustion motors work in order to learn to drive a car. :-) All this is just an example of very compactly-written Lua code squeezed into a few lines.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Explaining this SetScript to an idiot.
    Quote from theultimateend
    edit: Opened LibStub.lua and had a stroke. Will read up more.


    LibStub is like a showcase for most of Lua's idioms all in one place.

    That's not a bad thing. Every language has its idioms -- its traditions and conventions and ways of doing things that you won't find in other languages. With Lua, a lot of those idioms are in the syntax, not the behavior. It would be 100% possible to write LibStub in a more "example in a textbook" format with exactly the same runtime behavior, but then it would be about 3 times as long. :-)

    Once you can understand this line in LibStub:NewLibrary,
    self.minors[major], self.libs[major] = minor, self.libs[major] or {}
    

    then you've got a big chunk of Lua's idioms under your belt right there.

    The textbook version of that line is like
    self.minors[major] = minor
    local temp = self.libs[major]
    if temp ~=  nil then
        self.libs[major] = temp    -- does nothing
    else
        self.libs[major] = {}
    end
    ignoring some details about nil/false conversions.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Learning Aid 2.0 Brainstorming
    Quote from Dridzt
    otherwise quickly identify (a) passive vs active abilities


    Isn't that the golden "elite" dragon border? Or are you talking about something different?

    as well as (b) highlight active spells that are not on any bar.


    zomgyesplease

    There would probably be a lot of false positives from macros containing the abilities (e.g., spell+/startattack), but the audience who would be using those macros is probably a disjoint audience from one that would be confused by the warnings. :-)
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    Quote from flopsygamer
    I would really like to be able to saved out all the bar setup and layout information, kind of like ActionBarSaver does for the contents of the bar. I doubt I will be setting up too many more alts, but I have to go through the same painful process each time. I would like a command in BT rather than having to manually copy folders though since that may bring extra things along.


    This sounds exactly what the Profiles part of the /bt window does: saves layout and options in a way that's available across all characters. Is there something there which doesn't do what you want?
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    Quote from Icharispally
    I have Ark Inventory and Bartender 4 and I only see 1 bag in the bag menu. How do i switch out bags with only my backpack showing?


    For BT4, I found I need to (A) unlock the buttons, and then (B) toggle its BagBar "only show one bag" option.

    I don't know if/how Ark Inventory is involved at all, can't help you there.
    Posted in: General AddOns
  • 0

    posted a message on Recount
    Quote from Elsia
    *) The deletion popup mid-scenario when members join or leave the group.


    This part seems to be working now, thanks!

    I had hacked around this locally by adding a line at the start of Recount:ShowReset() to test if any fight data had been stored, and if not, then return early. It didn't do anything to help the "mid-scenario" situation specifically, but it would avoid repeated popups when nothing had happened in between.
    Posted in: General AddOns
  • 0

    posted a message on Recount
    Quote from Lombra
    As far as I understood, unit GUIDs are always strings because WoW can't handle 64-bit yada yada, and so you wouldn't be to apply a mask?


    Yep. Pelf is right, they don't decode a GUID anywhere. Ah well.
    Posted in: General AddOns
  • To post a comment, please or register a new account.