Jump to content


Photo

TargetClaim my first addon try


    8 replies to this topic

    #1 Kenshi

    Kenshi

      Advanced Member

    • Members
    • PipPipPip
    • 334 posts

      Posted 05 February 2015 - 11:47 PM

      I did my first try with an addon, and its seems its doing what I wanted. This addon will tell you who has the claim of a mob or what is targetting your target if its a pc.

      I used the code in the targetinfo addon to create the text box and the settings, I have no programming skills so its very possible that some code could be simplified or coded in a better way, so please if you see something that could be enhanced please tell me :)

       

      https://github.com/K..._windower_addon



      #2 Wildman

      Wildman

        Advanced Member

      • Members
      • PipPipPip
      • 72 posts

        Posted 06 February 2015 - 06:42 AM

        Thanks for this, nice job. Does what its suppose to :)

         

        Only had 1 issue and I can't get it to repeat.

        My console got spammed with about 10 lines of:

        .../targetclaim.lua:89: attempt to index a nil value

         

        A player zoned in right in front of me and i targeted that player and seen the error but hasn't done it again.



        #3 Kenshi

        Kenshi

          Advanced Member

        • Members
        • PipPipPip
        • 334 posts

          Posted 06 February 2015 - 01:19 PM

          thats weird, you should lose target when zone. tell me if it happens again.



          #4 Iryoku

          Iryoku

            Advanced Member

          • Windower Staff
          • 488 posts

            Posted 06 February 2015 - 06:45 PM

            The addon's name had me concerned for a bit, lol. You should consider submitting a pull request on GitHub so this can be formally reviewed and (very likely) accepted into the main Windower repository.

             

            Edit:

            Now that I look at the repo more closely, I see you didn't do the normal process for preparing an addon for submission. I'll quickly run down what you should do if you want to submit it.

             

            1. Go to the Windower/Lua repository and click fork at the top of the page. This will create a personal copy of the repository linked to your account.
            2. Clone this repository using whichever git client you feel comfortable using.
            3. Create a branch for this pull request. This isn't strictly necessary, but it's good practice to keep each project on a separate branch; it makes preparing the pull request much easier if you start to work on multiple Addons at once.
            4. Create a subdirectory for your addon inside of the addons directory, and place the necessary files inside.
            5. Edit the addons.xml file to include your addon so that Launcher knows about it. You must include the addon's display name, a description of what the addon does, a link to your issue tracker (every GitHub repo gets one) and a link where people can contact you for support.
            6. Commit your changes to the branch and synchronize to push your changes to GitHub.
            7. Click "Pull Requests" on the right hand side of the repository's page.
            8. Click the green "New Pull Request" at the top of the page.
            9. Select the branch you created in step 3 above as a source, and select the dev branch from the Windower repository as a destination.
            10. Enter a short description of what the pull request contains, and submit it.

            At this point an email will be sent to all interested parties, and one of us (most likely Arcon) will do a code review. If there are any problems that need to be addressed, comments will be left on the pull request and you will be notified by email. If this is the case you can simply commit the fixes and GitHub will automatically append them to the pull request (this is why you should always do your work in a separate branch). Once any problems have been resolve we will merge the changes into the development branch and it will be pushed out to everyone else a few days later.


            Edited by Iryoku, 06 February 2015 - 07:06 PM.


            #5 Kenshi

            Kenshi

              Advanced Member

            • Members
            • PipPipPip
            • 334 posts

              Posted 06 February 2015 - 09:45 PM

              Ok, thx for the guide, I'll do so. Im gonna change the code a few to try to avoid the issue wildman had.



              #6 Wildman

              Wildman

                Advanced Member

              • Members
              • PipPipPip
              • 72 posts

                Posted 07 February 2015 - 09:18 PM

                Had the same error again but on line 82 this time. Was in dynamis at the time with lots of mobs being pulled. I was targeting around and it happened, same as before I can't make it happen though, it's random.



                #7 Kenshi

                Kenshi

                  Advanced Member

                • Members
                • PipPipPip
                • 334 posts

                  Posted 07 February 2015 - 11:27 PM

                  Are you using the same one that you were using yesterday? I updated the code a bit.



                  #8 Wildman

                  Wildman

                    Advanced Member

                  • Members
                  • PipPipPip
                  • 72 posts

                    Posted 08 February 2015 - 12:56 AM

                    was the same one yes from when i reported the first error. I'll grab the newest and report back if any errors occur.



                    #9 Arcon

                    Arcon

                      Advanced Member

                    • Windower Staff
                    • 1189 posts
                    • LocationMunich, Germany

                    Posted 09 February 2015 - 10:41 AM

                    There are a few places inside the addon that are not protected from certain cases, which is where the error could originate from. I'll comment on the code in a bit, but I'm still trying to decide if this should be incorporated into the TargetInfo addon or not.






                    1 user(s) are reading this topic

                    0 members, 1 guests, 0 anonymous users