• 0

    posted a message on Need Help with my Addon MeetNGreet

    Incorrect. Look at the folder structure Seerah linked above.


    Make a folder called MeetNGreet, and put the Libs folder, the MeetNGreet.toc file, and Core.lua inside the MeetNGreet folder. There is NO folder or file with the version. You assign a version on your project webpage.


    MeetNGreet.zip contains:

    • Libs folder
    • Locales folder
    • MeetNGreet.toc
    • Core.lua
    • Bindings.xml
    Posted in: AddOn HELP!
  • 0

    posted a message on Oneliner to extract ONE variable from a function ?

    Also, keep in mind that select() is a function all in an of itself. If you use select() often, it will impact performance. To avoid that, use the underscore _ as a throwaway variable. _ is defined in the Blizzard UI code and Lua, so you need to make yours a local reference. You also do not need to assign it if it is the last return if you do not need that return.

    local _, _, three = GetFourThings()
    print(three) -- 3
    print(_) -- 2, because 1 is overwritten
    print(four) -- nil, not defined



    Posted in: Lua Code Discussion
  • 0

    posted a message on Oneliner to extract ONE variable from a function ?

    You are not understanding how select() works. Sure, it returns all the variables starting with the select(# ...) but if you only assign one variable to return, the other arguments are ignored, at least for your purposes. They are still returned, but you have no variables to catch them.

    -- example A
    local one, two, three, four = GetFourThings()
    print(one, two, three, four) -- 1, 2, 3, 4
    -- example B
    local three = select(3, GetFourThings())
    print(three) -- 3
    print(four) -- nil, as four is not an existing variable
    -- example C
    local three, four = select(3, GetFourThings())
    print(three, four) -- 3, 4


    Posted in: Lua Code Discussion
  • 0

    posted a message on Skinner

    Jncl, you might want to move the Skinner code for SmartRes2 to outdated for now. Your code works with the last Release version of SR2, but the upcoming soon-to-be-released version will break that code.


    The good news is that eventually there will be a much easier way to skin or theme SmartRes2, but that won't be immediately in the next Release version, and come with a module I haven't written yet.


    Just giving you a heads up! :-)

    Posted in: General AddOns
  • 0

    posted a message on Download Counts

    Random Demon Hunter jumping onto topic. Are hyphenated names acceptable in WoW? I thought it was underscore or nothing. Except, of course, addons with leading punctuation, like !BugGrabber.

    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?

    The packager is good at automating things. It will pull in the appropriate files for you, without you having to first download and unzip Ace3 or other libraries.


    At the risk of overloading you with more information and tips, I am going to link SmartRes2's pkgmeta.yaml, followed by its SmartRes2.toc file so you can see how it is done, and compare the two.

    package-as: SmartRes2
        Libs/LibStub: https://repos.wowace.com/wow/libstub/trunk
        Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
        Libs/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0
        Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
        Libs/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
        Libs/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0
        Libs/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0
        Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
        Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
        Libs/AceLocale-3.0: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0
        Libs/LibDBIcon-1.0: https://repos.wowace.com/wow/libdbicon-1-0/trunk
        Libs/LibDataBroker-1.1: https://repos.wowace.com/wow/libdatabroker-1-1
        Libs/LibDualSpec-1.0: https://repos.wowace.com/wow/libdualspec-1-0    
        Libs/LibResInfo-1.0: https://github.com/phanx-wow/LibResInfo
        - Libs/LibStub/tests
        - findglobals

     And now the .toc file

    ## Interface: 70100
    ## Title: SmartRes2
    ## Notes: Co-ordinated targetless Party and Raid wipe recovery. Evolved
    ## Notes-ruRU: @localization(locale="ruRU", key="Notes", namespace="ToC")@
    ## Notes-deDE: @localization(locale="deDE", key="Notes", namespace="ToC")@
    ## Notes-koKR: @localization(locale="koKR", key="Notes", namespace="ToC")@
    ## Notes-esMX: @localization(locale="esMX", key="Notes", namespace="ToC")@
    ## Notes-esES: @localization(locale="esES", key="Notes", namespace="ToC")@
    ## Notes-ptBR: @localization(locale="ptBR", key="Notes", namespace="ToC")@
    ## Notes-zhCN: @localization(locale="zhCN", key="Notes", namespace="ToC")@
    ## Notes-zhTW: @localization(locale="zhTW", key="Notes", namespace="ToC")@
    ## Notes-itIT: @localization(locale="itIT", key="Notes", namespace="ToC")@
    ## Notes-frFR: @localization(locale="frFR", key="Notes", namespace="ToC")@
    ## Version: @project-version@
    ## X-Project-Revision: @project-revision@
    ## Author: Myrroddin
    ## X-Author-Guild: Knights of the Storm
    ## X-Author-Server: Llane US
    ## X-Author-Faction: Alliance
    ## X-Email: psvander at gmail dot com
    ## X-Category: Raid, Party, Healer, Priest, Shaman, Paladin, Druid, Monk
    ## X-Localizations: enUS, frFR, deDE, esES, esMX, ruRU, zhCN, koKR, zhTW, ptBR, itIT
    ## X-Website: https://mods.curse.com/addons/wow/smartres2
    ## X-Credits: Jerry, Onaforeignshore, Morgalm, Torhal, and the original SmartRes team!
    ## X-License: © 2009 - 2017, Paul "Myrroddin" Vandersypen. All Rights Reserved
    ## SavedVariables: SmartRes2DB
    ## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibDualSpec-1.0, LibResInfo-1.0
    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?
    Quote from Fulgerul >>

    Seems I get an error in regards to the external deps:


    Invalid pkgmeta file: externals must be a mapping



    Thanks for this!

     Change your externals to remove the Ace3 subfolder, and list them directly in the Libs folder. Do that for all your externals.
    url: blahbhah.com
    url: tralalala.com



    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?

    If it does not work, it is because there in truth is no such thing as "Ace3". There is instead AceBlah-3.0, AceOtherBlah-3.0. etc. which are loaded by the standalone Ace3.toc in the standalone Ace3 folder.


    But projects that use Ace3 are not using the standalone version. They are using the various components, which have unique URLs within the Ace3 source URL.


    That said, in MyAddOn.toc, in the OptionalDeps section, you do list it as Ace3, because that infers no-lib-strip (whether or not you actually set up your project that way), allowing the whole of Ace3 to be loaded. Again, standalone.

    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?

    You did not need to rename your pkgmeta, but now that you have, there is a typo in the name. "pkgmeta.yaml" not ".pkgmeta.yaml" ... there is no leading period in the .yaml version.


    The link is working for me now. Weird that it wasn't before.


    Near the top of the webpage in either Curseforge or Wowace, click the Dashboard, then builds. Then click the left column link for this project. You should, after a page refresh, get quite a lot of information about your push attempts. There might even be an error.


    Add these lines to pkgmeta.yaml, seeing how Recount is required. This will cause the Curse App to install Recount for the user if it is not already installed, should the user install your addon first.

    - recount



    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?

    Some further issues:

    • https://repos.curseforge.com/wow/profiles-recount does not exist. I can't find it, and if it can't be found, you cannot pull or push to it.
    • Your externals list Ace3. Fine, but which parts? Because that is not the correct path to Ace3.
    • Your externals do not list LibStub, and CallbackHandler-1.0, which Ace3 uses.
    • Since I can guess that your project has something to do with Recount, where is Recount listed in the Dependencies section of your pkgmeta.yaml?
    Posted in: WoW Sites Feedback
  • 0

    posted a message on Tagging in GIT ?

    Do not add the pkgmeta to your ignore set. From the Knowledge Base:

    Files beginning with a period, like .pkgmeta and .docmeta, are always ignored by the packager and should not be listed here.

    The .yaml files are just renamed from the same beginning with a period, meaning,

    .pkgmeta = pkgmeta.yaml
    .docmeta = docmeta.yaml


    Posted in: WoW Sites Feedback
  • 0

    posted a message on Lib-nolib creation

    You do not want to use the ignore command in your pkgmeta, as that will ignore whatever is listed in that section. Post your pkgmeta code.

    Posted in: WoW Sites Feedback
  • 0

    posted a message on Problems with level comparison
    Quote from darkrunedk >>

    I have now added the changed the function to a local function. Hopefully this won't break the addon ☺

     It won't, and now it won't break other addon code, or worse, Blizzard code.
    Think of it this way: assume I am either ignorant or sinister, and you did not make that function local to your addon. I could then write a function with the exact same name "partyLevelUp", and have mine do something totally different to your function. I could even call your function and pass incorrect data to your arguments causing your code to error and you'd never know why.
    That would mean that one function, depending on when it was called, would overwrite the other. Yours would overwrite mine, and sometimes mine would overwrite yours. There is absolutely zero way to control that.
    Now your function is local to your file scope because you added the word "local". Even if I did write something with the same name, neither of our code impacts the other, yet, because my version is not local to my file scope, some other addon or Blizzard code can cause conflicts. Your addon is safe, but mine is ... potentially (probably) corrupt.

    To read more about variable scope, read here:

    Posted in: AddOn HELP!
  • 0

    posted a message on Problems with level comparison

    Your function partyLevelUp is not local, and is polluting the global namespace. Put the word local in front of it.

    Posted in: AddOn HELP!
  • 0

    posted a message on pkgmeta and the new site

    For your LibStub and CallbackHandler URLs, use the first two links, as the latter are the dependency links for Ace3. If you want LS and CBH, you want their direct URLs, and not a pass-through some other project.


    In short, use the URL on each library's Source page, and not some other project's URL structure.


    The reason the CBH URL is longer is because of the standalone version's file structure. If you look at the folder on your hard drive, CallbackHandler-1.0.lua is inside its own folder, which is inside the root CallbackHandler-1.0 folder. The URL extension jumps right to the file you want.


    To skip the tests folder that ships with LibStub, add these two lines to your pkgmeta, assuming you also had a Libs folder (if not, just remove that part of the line):

        - Libs/LibStub/tests


    Posted in: WoW Sites Feedback
  • To post a comment, please or register a new account.